@@ -39,6 +39,10 @@ public static TheoryData<Expression, string> ExpressionAndTexts
39
39
( Expression < Func < TestModel , int > > ) ( testModel => testModel . SelectedCategory . CategoryId ) ,
40
40
"SelectedCategory.CategoryId"
41
41
} ,
42
+ {
43
+ ( Expression < Func < LowerModel , int > > ) ( testModel => testModel . selectedcategory . CategoryId ) ,
44
+ "selectedcategory.CategoryId"
45
+ } ,
42
46
{
43
47
( Expression < Func < TestModel , string > > ) ( model => model . SelectedCategory . CategoryName . MainCategory ) ,
44
48
"SelectedCategory.CategoryName.MainCategory"
@@ -71,6 +75,10 @@ public static TheoryData<Expression, string> ExpressionAndTexts
71
75
( Expression < Func < IList < TestModel > , Category > > ) ( model => model [ i ] . SelectedCategory ) ,
72
76
"[3].SelectedCategory"
73
77
} ,
78
+ {
79
+ ( Expression < Func < IList < LowerModel > , Category > > ) ( model => model [ i ] . selectedcategory ) ,
80
+ "[3].selectedcategory"
81
+ } ,
74
82
{
75
83
( Expression < Func < IDictionary < string , TestModel > , string > > ) ( model => model [ key ] . SelectedCategory . CategoryName . MainCategory ) ,
76
84
"[TestModel].SelectedCategory.CategoryName.MainCategory"
@@ -87,10 +95,18 @@ public static TheoryData<Expression, string> ExpressionAndTexts
87
95
( Expression < Func < IList < TestModel > , int > > ) ( model => model [ 2 ] . PreferredCategories [ i ] . CategoryId ) ,
88
96
"[2].PreferredCategories[3].CategoryId"
89
97
} ,
98
+ {
99
+ ( Expression < Func < IList < LowerModel > , int > > ) ( model => model [ 2 ] . preferredcategories [ i ] . CategoryId ) ,
100
+ "[2].preferredcategories[3].CategoryId"
101
+ } ,
90
102
{
91
103
( Expression < Func < IList < TestModel > , string > > ) ( model => model . FirstOrDefault ( ) . Name ) ,
92
104
"Name"
93
105
} ,
106
+ {
107
+ ( Expression < Func < IList < LowerModel > , string > > ) ( model => model . FirstOrDefault ( ) . name ) ,
108
+ "name"
109
+ } ,
94
110
{
95
111
( Expression < Func < IList < TestModel > , string > > ) ( model => model . FirstOrDefault ( ) . Model ) ,
96
112
"Model"
@@ -285,10 +301,22 @@ public static TheoryData<Expression, Expression> NonEquivalentExpressions
285
301
( Expression < Func < TestModel , Category > > ) ( model => model . SelectedCategory ) ,
286
302
( Expression < Func < TestModel , CategoryName > > ) ( model => model . SelectedCategory . CategoryName )
287
303
} ,
304
+ {
305
+ ( Expression < Func < TestModel , CategoryName > > ) ( model => model . SelectedCategory . CategoryName ) ,
306
+ ( Expression < Func < LowerModel , CategoryName > > ) ( model => model . selectedcategory . CategoryName )
307
+ } ,
288
308
{
289
309
( Expression < Func < TestModel , string > > ) ( model => model . Model ) ,
290
310
( Expression < Func < TestModel , string > > ) ( model => model . Name )
291
311
} ,
312
+ {
313
+ ( Expression < Func < TestModel , string > > ) ( model => model . Model ) ,
314
+ ( Expression < Func < LowerModel , string > > ) ( model => model . model )
315
+ } ,
316
+ {
317
+ ( Expression < Func < TestModel , string > > ) ( model => model . Name ) ,
318
+ ( Expression < Func < LowerModel , string > > ) ( model => model . name )
319
+ } ,
292
320
{
293
321
( Expression < Func < TestModel , CategoryName > > ) ( model => model . SelectedCategory . CategoryName ) ,
294
322
( Expression < Func < TestModel , string > > ) ( model => value )
@@ -301,6 +329,10 @@ public static TheoryData<Expression, Expression> NonEquivalentExpressions
301
329
( Expression < Func < IList < TestModel > , Category > > ) ( model => model [ 2 ] . SelectedCategory ) ,
302
330
( Expression < Func < TestModel , string > > ) ( model => model . SelectedCategory . CategoryName . MainCategory )
303
331
} ,
332
+ {
333
+ ( Expression < Func < IList < TestModel > , Category > > ) ( model => model [ 2 ] . SelectedCategory ) ,
334
+ ( Expression < Func < IList < LowerModel > , Category > > ) ( model => model [ 2 ] . selectedcategory )
335
+ } ,
304
336
{
305
337
( Expression < Func < TestModel , int > > ) ( testModel => testModel . SelectedCategory . CategoryId ) ,
306
338
( Expression < Func < TestModel , Category > > ) ( model => model . SelectedCategory )
@@ -309,6 +341,10 @@ public static TheoryData<Expression, Expression> NonEquivalentExpressions
309
341
( Expression < Func < IDictionary < string , TestModel > , string > > ) ( model => model [ key ] . SelectedCategory . CategoryName . MainCategory ) ,
310
342
( Expression < Func < TestModel , Category > > ) ( model => model . SelectedCategory )
311
343
} ,
344
+ {
345
+ ( Expression < Func < IDictionary < string , TestModel > , string > > ) ( model => model [ key ] . SelectedCategory . CategoryName . MainCategory ) ,
346
+ ( Expression < Func < IDictionary < string , LowerModel > , string > > ) ( model => model [ key ] . selectedcategory . CategoryName . MainCategory )
347
+ } ,
312
348
{
313
349
( Expression < Func < TestModel , string > > ) ( m => Model ) ,
314
350
( Expression < Func < TestModel , string > > ) ( m => m . Model )
@@ -408,6 +444,17 @@ private class TestModel
408
444
public IList < Category > PreferredCategories { get ; set ; }
409
445
}
410
446
447
+ private class LowerModel
448
+ {
449
+ public string name { get ; set ; }
450
+
451
+ public string model { get ; set ; }
452
+
453
+ public Category selectedcategory { get ; set ; }
454
+
455
+ public IList < Category > preferredcategories { get ; set ; }
456
+ }
457
+
411
458
private class Category
412
459
{
413
460
public int CategoryId { get ; set ; }
0 commit comments