-
-
Notifications
You must be signed in to change notification settings - Fork 238
Closed
Labels
Description
Consider the following expression:
DayOfWeek.Monday + 1
This unexpectedly throws:
System.InvalidOperationException:
'No coercion operator is defined between types 'System.DayOfWeek' and 'System.Nullable`1[System.Decimal]'.'
The same happens if we pass DayOfWeek as it and use the simpler expression: it + 1.
Note this is perfectly legitimate C# syntax and semantics, and I have also tested this operation works well in the original Dynamic LINQ library.
From the exception message it seems there is some unhandled edge case, but no idea yet of how it comes to involve nullable types.