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
fix: resolve type of conditional expressions in derived properties
Previously, derived properties with conditional expressions returning mixed
nullable/non-nullable types would have their type resolved to Object, causing:
"Unsupported value '0' for type 'Object'" errors when filtering.
This occurred with expressions like:
x.Date.HasValue ? (calculation).Days : (int?)null
The fix properly resolves the type of conditional expressions by:
1. Detecting when a derived property expression has Object type
2. Unwrapping any Convert/Unary expressions to find the actual conditional
3. Analyzing the true/false branches to determine the correct type
4. Reconstructing the conditional expression with the proper type
5. Converting the left expression for comparison to use the resolved type
Also improved CreateRightExpr to handle Object-typed conditional expressions
by resolving their actual underlying type before creating comparison values.
Test added to verify complex conditional expressions with nullable types
work correctly for filtering operations.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments