Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Ramstack.ExpressionParser/Internal/TypeUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Ramstack.Parsing.Internal;
/// <summary>
/// Provides type utility methods.
/// </summary>
public static class TypeUtils
internal static class TypeUtils
{
private static ReadOnlySpan<Primitives> PrimitiveConversions =>
[
Expand Down
3 changes: 3 additions & 0 deletions tests/Ramstack.ExpressionParser.Tests/Data/Errors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,9 @@ Operator '==' cannot be applied to operands of type 'System.DayOfWeek' and 'Syst
true ? 1.0 : 2m
Operator '?:' cannot be applied to operands of type 'System.Double' and 'System.Decimal'.

true ? 1.0f : 2m
Operator '?:' cannot be applied to operands of type 'System.Single' and 'System.Decimal'.

true ? 1 : 1ul
Operator '?:' cannot be applied to operands of type 'System.Int32' and 'System.UInt64'.

Expand Down
24 changes: 24 additions & 0 deletions tests/Ramstack.ExpressionParser.Tests/Data/Expressions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,30 @@ IIF(True, Convert(1, Double), 2)
false ? 1 : 2m
IIF(False, Convert(1, Decimal), 2)

false ? 'a' : 2m
IIF(False, Convert(a, Decimal), 2)

false ? 1 :> sbyte : 2m
IIF(False, Convert(Convert(1, SByte), Decimal), 2)

false ? 1 :> byte : 2m
IIF(False, Convert(Convert(1, Byte), Decimal), 2)

false ? 1 :> short : 2m
IIF(False, Convert(Convert(1, Int16), Decimal), 2)

false ? 1 :> ushort : 2m
IIF(False, Convert(Convert(1, UInt16), Decimal), 2)

false ? 1u : 2m
IIF(False, Convert(1, Decimal), 2)

false ? 1L : 2m
IIF(False, Convert(1, Decimal), 2)

false ? 1ul : 2m
IIF(False, Convert(1, Decimal), 2)

true ? 'a' : 1
IIF(True, Convert(a, Int32), 1)

Expand Down
37 changes: 0 additions & 37 deletions tests/Ramstack.ExpressionParser.Tests/TypeUtilsTest.cs

This file was deleted.