From 5abad87c571a9737d843f5b9c0163f3cd49b1e4e Mon Sep 17 00:00:00 2001 From: hadashiA Date: Thu, 16 Nov 2023 17:00:18 +0900 Subject: [PATCH] Fix a wrong t4 condition --- src/Utf8StringInterpolation/Utf8String.AppendFormatted.cs | 2 +- src/Utf8StringInterpolation/Utf8String.AppendFormatted.tt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Utf8StringInterpolation/Utf8String.AppendFormatted.cs b/src/Utf8StringInterpolation/Utf8String.AppendFormatted.cs index 8cdcf74..b2b7e1f 100644 --- a/src/Utf8StringInterpolation/Utf8String.AppendFormatted.cs +++ b/src/Utf8StringInterpolation/Utf8String.AppendFormatted.cs @@ -1286,7 +1286,7 @@ void AppendFormattedAlignment(TimeSpan value, int alignment, string? format) } #endif -#if !NET8_0_OR_GREATER +# if true [MethodImpl(MethodImplOptions.AggressiveInlining)] public void AppendFormatted(char? value, int alignment = 0, string? format = null) diff --git a/src/Utf8StringInterpolation/Utf8String.AppendFormatted.tt b/src/Utf8StringInterpolation/Utf8String.AppendFormatted.tt index 021c882..dc2db85 100644 --- a/src/Utf8StringInterpolation/Utf8String.AppendFormatted.tt +++ b/src/Utf8StringInterpolation/Utf8String.AppendFormatted.tt @@ -29,7 +29,7 @@ namespace Utf8StringInterpolation; public ref partial struct Utf8StringWriter { <# foreach(var x in generateTypes) { #> -<#= (x.type is not "bool" or "char") ? "#if !NET8_0_OR_GREATER" : "# if true" #> +<#= (x.type is not "bool" and not "char") ? "#if !NET8_0_OR_GREATER" : "# if true" #> [MethodImpl(MethodImplOptions.AggressiveInlining)] public void AppendFormatted(<#= x.type #>? value, int alignment = 0, string? format = null)