We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f62646f + bcb0f0d commit e1c1cc7Copy full SHA for e1c1cc7
1 file changed
src/System.Linq.Dynamic.Core/ExpressionParser.cs
@@ -607,7 +607,7 @@ Expression ParseComparison()
607
object wrt = null;
608
if (constantExpr.Value is string)
609
{
610
- wrt = Enum.Parse(left.Type, constantExpr.Value as string, true);
+ wrt = Enum.Parse(GetNonNullableType(left.Type), constantExpr.Value as string, true);
611
}
612
else
613
@@ -620,7 +620,7 @@ Expression ParseComparison()
620
621
622
623
- wrt = Enum.Parse(right.Type, constantExpr.Value as string, true);
+ wrt = Enum.Parse(GetNonNullableType(right.Type), constantExpr.Value as string, true);
624
625
626
@@ -2441,4 +2441,4 @@ internal static void ResetDynamicLinqTypes()
2441
_keywords = null;
2442
2443
2444
-}
+}
0 commit comments