@@ -1338,13 +1338,15 @@ public void ExpressionTests_NullCoalescing()
1338
1338
[ InlineData ( "np(nested._enum)" , "Select(Param_0 => IIF(((Param_0 != null) AndAlso (Param_0.nested != null)), Convert(Param_0.nested._enum), null))" ) ]
1339
1339
[ InlineData ( "np(item.Id)" , "Select(Param_0 => IIF(((Param_0 != null) AndAlso (Param_0.item != null)), Convert(Param_0.item.Id), null))" ) ]
1340
1340
[ InlineData ( "np(item.GuidNormal)" , "Select(Param_0 => IIF(((Param_0 != null) AndAlso (Param_0.item != null)), Convert(Param_0.item.GuidNormal), null))" ) ]
1341
+ [ InlineData ( "np(nested.dtnullable.Value.Year)" , "Select(Param_0 => IIF((((Param_0 != null) AndAlso (Param_0.nested != null)) AndAlso (Param_0.nested.dtnullable != null)), Convert(Param_0.nested.dtnullable.Value.Year), null))" ) ]
1341
1342
#else
1342
1343
[ InlineData ( "np(nested.g)" , "Select(Param_0 => IIF(((Param_0 != null) AndAlso (Param_0.nested != null)), Convert(Param_0.nested.g, Nullable`1), null))" ) ]
1343
1344
[ InlineData ( "np(nested.dt)" , "Select(Param_0 => IIF(((Param_0 != null) AndAlso (Param_0.nested != null)), Convert(Param_0.nested.dt, Nullable`1), null))" ) ]
1344
1345
[ InlineData ( "np(nested.number)" , "Select(Param_0 => IIF(((Param_0 != null) AndAlso (Param_0.nested != null)), Convert(Param_0.nested.number, Nullable`1), null))" ) ]
1345
1346
[ InlineData ( "np(nested._enum)" , "Select(Param_0 => IIF(((Param_0 != null) AndAlso (Param_0.nested != null)), Convert(Param_0.nested._enum, Nullable`1), null))" ) ]
1346
1347
[ InlineData ( "np(item.Id)" , "Select(Param_0 => IIF(((Param_0 != null) AndAlso (Param_0.item != null)), Convert(Param_0.item.Id, Nullable`1), null))" ) ]
1347
1348
[ InlineData ( "np(item.GuidNormal)" , "Select(Param_0 => IIF(((Param_0 != null) AndAlso (Param_0.item != null)), Convert(Param_0.item.GuidNormal, Nullable`1), null))" ) ]
1349
+ [ InlineData ( "np(nested.dtnullable.Value.Year)" , "Select(Param_0 => IIF((((Param_0 != null) AndAlso (Param_0.nested != null)) AndAlso (Param_0.nested.dtnullable != null)), Convert(Param_0.nested.dtnullable.Value.Year, Nullable`1), null))" ) ]
1348
1350
#endif
1349
1351
1350
1352
[ InlineData ( "np(nested.strNull)" , "Select(Param_0 => IIF(((Param_0 != null) AndAlso (Param_0.nested != null)), Param_0.nested.strNull, null))" ) ]
@@ -1502,8 +1504,8 @@ public void ExpressionTests_NullPropagation_NullableDateTime()
1502
1504
} . AsQueryable ( ) ;
1503
1505
1504
1506
// Act
1505
- var result = q . OrderBy ( x => x . date1 ) . Select ( x => x . id ) . ToArray ( ) ;
1506
- var resultDynamic = q . OrderBy ( "np(date1)" ) . Select ( "id" ) . ToDynamicArray < int > ( ) ;
1507
+ var result = q . OrderBy ( x => x . date1 . Value . Year ) . Select ( x => x . id ) . ToArray ( ) ;
1508
+ var resultDynamic = q . OrderBy ( "np(date1.Value.Year )" ) . Select ( "id" ) . ToDynamicArray < int > ( ) ;
1507
1509
1508
1510
// Assert
1509
1511
Check . That ( resultDynamic ) . ContainsExactly ( result ) ;
0 commit comments