You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please fill in the relevant information from this template so that we can help you best.
Smart.Format version: 2.7.1
Framework version: (e.g. net5.0) .NET Core 3.1
Please provide a working source code example to reproduce the bug {Id:cond:=1234?yes|no} P.S.Id is unsigned number type
What is the current result? "=1234?yes", no matter if Id is 1234 or not
What is the expected result? if Id is 1234 then "yes", otherwise "no"
Please post full exception details if applicable (message, stacktrace, inner exceptions)
Did you find a workaround? yes, cast your number into signed one...
Is there a version in which it worked? nah
Can you help us by writing an unit test? nah, sorry
I think the source of this bug is incorrect type check inside formatters...there was already this type of issue (#108), in PluralLocalization formatter...it appears to be fixed in that particular formatter, but not in others...for example Conditional formatter
axunonb
changed the title
Does not support any unsigned numbers (uint/ubyte/ulong etc.)
Does not support any unsigned numbers (uint/ushort/ulong etc.)
Dec 26, 2021
Hi! Thanks for reporting this bug!
Please fill in the relevant information from this template so that we can help you best.
Smart.Format version: 2.7.1
Framework version: (e.g. net5.0) .NET Core 3.1
I think the source of this bug is incorrect type check inside formatters...there was already this type of issue (#108), in PluralLocalization formatter...it appears to be fixed in that particular formatter, but not in others...for example Conditional formatter
SmartFormat/src/SmartFormat/Extensions/ConditionalFormatter.cs
Line 38 in c4f0115
The text was updated successfully, but these errors were encountered: