515 references to WRN_NullReferenceReturn
Microsoft.CodeAnalysis.CSharp (6)
Errors\ErrorFacts.cs (3)
30
nullableWarnings.Add(GetId(ErrorCode.
WRN_NullReferenceReturn
));
420
case ErrorCode.
WRN_NullReferenceReturn
:
1890
case ErrorCode.
WRN_NullReferenceReturn
:
FlowAnalysis\NullableWalker.cs (2)
2262
ReportDiagnostic(assignmentKind == AssignmentKind.Return ? ErrorCode.
WRN_NullReferenceReturn
: ErrorCode.WRN_NullAsNonNullable, location);
2284
ReportDiagnostic(assignmentKind == AssignmentKind.Return ? ErrorCode.
WRN_NullReferenceReturn
: ErrorCode.WRN_NullReferenceAssignment, location);
Generated\ErrorFacts.Generated.cs (1)
197
case ErrorCode.
WRN_NullReferenceReturn
:
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
CodeGen\CodeGenAsyncMethodBuilderOverrideTests.cs (2)
230
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default(T)").WithLocation(14, 16),
233
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "await G((string?)null)").WithLocation(20, 16),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (505)
Semantics\DelegateTypeTests.cs (2)
7019
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "x2").WithLocation(11, 44),
7028
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "y2").WithLocation(15, 44),
Semantics\LambdaTests.cs (24)
4232
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(9, 52)
4282
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(18, 51),
4285
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(19, 41),
4291
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(20, 41),
4294
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(21, 41),
4300
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(23, 52),
4303
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(24, 50),
4309
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(25, 50),
4312
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(26, 50)
4347
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(17, 42),
4350
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(19, 53),
4353
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(20, 51)
4403
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(18, 54),
4406
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(19, 44),
4412
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(20, 44),
4415
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(21, 44),
4421
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(23, 55),
4424
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(24, 52),
4430
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(25, 52),
4433
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(26, 52)
4627
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(14, 83),
4633
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(18, 64)
5173
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default").WithLocation(9, 36),
5479
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "x").WithLocation(7, 65),
Semantics\NullableContextTests.cs (6)
203
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "C1").WithLocation(7, 27));
892
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(7, 20));
1235
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(7, 12));
1259
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(6, 22),
1333
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(7, 47));
1351
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(4, 39));
Semantics\NullableReferenceTypesTests.cs (468)
156
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, @"b ? """" : default", isSuppressed: false).WithLocation(10, 37),
159
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, @"b ? """" : null", isSuppressed: false).WithLocation(14, 37));
2251
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(6, 44),
2257
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(7, 45)
2290
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(6, 50),
2296
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(7, 51)
2447
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(5, 69),
2453
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(11, 69),
5060
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(3, 48)
14994
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(8, 35),
19755
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "y11.F1").WithLocation(63, 16));
20288
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "x1").WithLocation(10, 16)
25126
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "Value").WithLocation(18, 24)
25165
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "item.Value").WithLocation(22, 24)
25204
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "item.Value").WithLocation(22, 24)
25240
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "Value").WithLocation(17, 24)
25273
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "Value").WithLocation(16, 24)
25405
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "Value").WithLocation(15, 20)
25706
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "Value").WithLocation(16, 24)
25773
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "Value").WithLocation(21, 24)
25809
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "Value").WithLocation(16, 24),
25812
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "Value").WithLocation(18, 24)
25849
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "Value").WithLocation(22, 24)
25882
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "Value").WithLocation(18, 24)
25915
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "Value").WithLocation(18, 24)
25948
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "Value").WithLocation(18, 24)
25983
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "value").WithLocation(18, 24),
26052
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "value").WithLocation(18, 24)
26087
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "value").WithLocation(18, 24),
26154
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "c.Value").WithLocation(18, 24)
26192
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "Value").WithLocation(21, 20),
26195
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "Value").WithLocation(24, 16)
26259
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "Value").WithLocation(19, 20)
26293
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "Value").WithLocation(15, 20)
26327
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "Value").WithLocation(19, 20)
26361
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t.Value").WithLocation(19, 20)
26395
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "Value").WithLocation(15, 20)
26428
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "Value").WithLocation(18, 24)
26509
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "IsOk switch { true => throw null!, _ => Value }").WithLocation(13, 16)
26559
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "IsOk ? throw null! : Value").WithLocation(13, 16)
27750
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(9, 16),
27756
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(15, 16)
27788
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(9, 16),
27794
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(15, 16)
27826
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(9, 16),
27829
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(15, 16)
30396
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default", isSuppressed: false).WithLocation(31, 20),
30399
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default", isSuppressed: false).WithLocation(41, 20));
37530
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(35, 16),
37662
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default").WithLocation(32, 16)
37742
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(35, 16),
37797
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(13, 22),
37803
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(25, 22),
37933
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default").WithLocation(7, 22),
37936
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default").WithLocation(13, 22),
37945
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default").WithLocation(25, 22),
43617
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "s").WithLocation(13, 16),
43620
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "s").WithLocation(19, 20)
43645
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "s").WithLocation(11, 16)
43670
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "s").WithLocation(9, 20)
45906
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(4, 50)
46610
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "s").WithLocation(9, 20)
46635
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "s").WithLocation(11, 16)
53640
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "s?.ToString()").WithLocation(8, 57)
53665
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "s?.ToString()").WithLocation(8, 66)
53751
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "s1?.ToString()").WithLocation(9, 48)
53908
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "b ? null : null").WithLocation(9, 24)
53971
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "b ? default : default").WithLocation(9, 24)
54038
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "b ? x : y").WithLocation(11, 24)
54136
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "b switch { _ => null }").WithLocation(9, 24)
54170
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "b switch { true => x, _ => y }").WithLocation(11, 24)
54370
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default").WithLocation(10, 31),
54373
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(11, 31),
55522
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(3, 32)
56442
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "b1.G").WithLocation(11, 16),
56448
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "b3.G").WithLocation(30, 16));
56497
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "a1.F").WithLocation(10, 16),
56500
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "a3.F").WithLocation(29, 16));
57401
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u5").WithLocation(33, 16),
60774
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "M1()").WithLocation(12, 37),
60777
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "M1()").WithLocation(17, 49),
60780
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "M1()").WithLocation(24, 23),
60783
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "M1()").WithLocation(29, 35)
60874
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "M1()").WithLocation(20, 22),
60877
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "M1()").WithLocation(25, 22),
60880
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "M1()").WithLocation(30, 34),
60883
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "M1()").WithLocation(35, 34)
60983
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "M1()").WithLocation(19, 22),
60986
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "M1()").WithLocation(24, 22),
60989
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "M1()").WithLocation(29, 34),
60992
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "M1()").WithLocation(34, 34)
61092
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "y1").WithLocation(22, 28),
61098
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "y2").WithLocation(31, 28)
61147
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "y1").WithLocation(22, 28),
61150
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "y2").WithLocation(31, 28)
61430
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(22, 28)
61945
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "y").WithLocation(9, 56));
61973
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "y").WithLocation(9, 43),
61976
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "y").WithLocation(10, 33),
61979
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "x").WithLocation(14, 33),
61982
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "x").WithLocation(15, 43));
62855
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "y").WithLocation(8, 29),
63117
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(7, 48));
64171
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default(T)").WithLocation(22, 22));
64559
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default(T)").WithLocation(22, 16));
65819
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "x").WithLocation(9, 26));
65904
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "F<T?>()").WithLocation(7, 28));
65959
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "F<object?>()").WithLocation(10, 33),
72321
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(6, 16),
72324
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(12, 60)
72362
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(6, 22),
72365
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(8, 22)
72410
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(11, 26),
72413
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(13, 26)
72443
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default").WithLocation(6, 22),
72446
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default").WithLocation(10, 22),
72449
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default").WithLocation(14, 22)
72539
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(6, 22)
72568
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(11, 26)
72643
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(8, 22),
72646
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(9, 22),
72649
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(26, 26)
72696
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(8, 22),
72699
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(9, 22),
72702
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(26, 26)
75491
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(10, 27),
75497
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(string)null").WithLocation(11, 27),
75500
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(string?)null").WithLocation(12, 27),
75503
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null as string").WithLocation(13, 27),
75509
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default(string)").WithLocation(15, 27),
75512
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default").WithLocation(16, 27),
75515
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(p != null) ? p.MiddleName : null").WithLocation(17, 35),
75518
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "p.MiddleName ?? null").WithLocation(18, 35)
77372
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(3, 17));
77510
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(3, 26),
77513
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "o").WithLocation(4, 35));
77521
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(3, 26),
77524
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "o").WithLocation(4, 35));
77532
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(3, 26),
77535
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "o").WithLocation(4, 35));
78374
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "s").WithLocation(7, 12),
78377
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "s").WithLocation(10, 12),
78386
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "s").WithLocation(19, 12),
78389
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "s").WithLocation(22, 12),
78703
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default(T)").WithLocation(4, 37)
79015
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(4, 17));
79459
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(4, 25),
79462
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(5, 33),
79465
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(6, 40),
79468
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default").WithLocation(7, 37),
79471
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default(Task<T>)").WithLocation(8, 37),
79474
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(9, 53),
79477
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(10, 48));
79510
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(6, 39),
79513
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default").WithLocation(8, 43),
79516
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default(T)").WithLocation(9, 43),
79519
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(10, 59),
79525
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(13, 40),
79528
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default").WithLocation(14, 44));
79617
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T)null").WithLocation(6, 16),
79620
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T)null").WithLocation(10, 16),
79623
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(14, 16),
79626
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(18, 16));
87497
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t1").WithLocation(17, 20),
87503
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t2").WithLocation(19, 20),
87509
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "o1").WithLocation(25, 20),
87512
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "o2").WithLocation(27, 20));
87556
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t1").WithLocation(19, 20),
87562
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t2").WithLocation(21, 20),
87568
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "o1").WithLocation(27, 20),
87571
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "o2").WithLocation(29, 20));
105810
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t1").WithLocation(9, 16),
105813
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default").WithLocation(15, 23),
105816
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default(T2)").WithLocation(16, 23),
105822
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t2").WithLocation(20, 16),
105825
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default").WithLocation(26, 23),
105828
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default(T3)").WithLocation(27, 23),
105837
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default").WithLocation(38, 23),
105840
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default(T4)").WithLocation(39, 23),
105846
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t4").WithLocation(43, 16),
105849
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default").WithLocation(49, 23),
105852
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default(T5)").WithLocation(50, 23),
105858
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t5").WithLocation(54, 16),
105861
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default").WithLocation(4, 23),
105864
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default(T1)").WithLocation(5, 23));
106039
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(3, 34),
106042
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(6, 50),
106045
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(7, 49),
106048
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(10, 56),
106054
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(object)t").WithLocation(11, 34),
106060
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(object)t").WithLocation(14, 50),
106066
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(object)u").WithLocation(15, 49),
106072
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(object)u").WithLocation(18, 56));
106110
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(U)t").WithLocation(19, 44),
106116
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(U)t").WithLocation(20, 51),
106125
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(U)t").WithLocation(22, 51),
106131
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(U)(object)t").WithLocation(23, 32),
106295
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(U)(object)t").WithLocation(4, 31),
106304
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(U)(object)t").WithLocation(5, 47),
108697
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "_g").WithLocation(15, 28),
108700
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "_f").WithLocation(19, 28));
108736
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "_f").WithLocation(10, 28),
108742
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "_g").WithLocation(18, 28));
128125
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(8, 58),
128128
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(15, 78)
133165
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "o").WithLocation(8, 32));
135633
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "o").WithLocation(7, 32),
135636
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "o").WithLocation(11, 19),
135642
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(14, 28));
135677
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(12, 19),
135683
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(15, 28));
135716
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "o").WithLocation(11, 24),
135722
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(14, 28));
135757
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "o").WithLocation(12, 24),
135760
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "o").WithLocation(12, 24),
135769
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(15, 28),
135772
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(15, 28));
135803
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "s").WithLocation(12, 42),
135806
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "s").WithLocation(14, 32));
143263
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t1").WithLocation(9, 16),
143266
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t2").WithLocation(16, 16),
143269
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t3").WithLocation(23, 16),
143272
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t4").WithLocation(30, 16),
143275
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t7").WithLocation(51, 16));
143354
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t1").WithLocation(9, 16),
143357
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t4").WithLocation(30, 16),
143360
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t7").WithLocation(51, 16));
143481
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "r2").WithLocation(22, 16),
143487
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "r3").WithLocation(38, 16),
143493
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "r4").WithLocation(54, 16),
143499
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "r7").WithLocation(86, 16));
143536
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default(T)").WithLocation(4, 26),
143539
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default(T)").WithLocation(5, 42),
143542
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default(T)").WithLocation(7, 44),
143545
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default(U)").WithLocation(8, 41),
143548
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default(U)").WithLocation(9, 48),
143551
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default(U)").WithLocation(11, 50),
143557
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T)default(T)").WithLocation(12, 26),
143563
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T)default(T)").WithLocation(13, 42),
143569
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T)default(T)").WithLocation(15, 44),
143575
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T)default(U)").WithLocation(16, 41),
143581
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T)default(U)").WithLocation(17, 48),
143587
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T)default(U)").WithLocation(19, 50),
143593
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(U)default(T)").WithLocation(20, 41),
143599
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(U)default(T)").WithLocation(21, 48),
143608
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(U)default(T)").WithLocation(23, 50),
143614
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(U)(object)default(T)").WithLocation(24, 29),
143763
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(5, 40),
143766
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(6, 56),
143769
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(8, 58),
143772
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(9, 55),
143775
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(10, 62),
143778
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(12, 64),
143781
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T)t").WithLocation(13, 40),
143787
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T)t").WithLocation(14, 56),
143790
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T)t").WithLocation(16, 58),
143793
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T)u").WithLocation(17, 55),
143796
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T)u").WithLocation(18, 62),
143799
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T)u").WithLocation(20, 64),
143802
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(U)t").WithLocation(21, 55),
143808
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(U)t").WithLocation(22, 62),
143814
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(U)t").WithLocation(24, 64),
143817
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(U)(object)t").WithLocation(25, 43),
143826
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(5, 40),
143829
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(6, 56),
143832
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(8, 58),
143835
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(9, 55),
143838
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(10, 62),
143841
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(12, 64),
143847
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T)t").WithLocation(13, 40),
143853
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T)t").WithLocation(14, 56),
143859
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T)t").WithLocation(16, 58),
143865
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T)u").WithLocation(17, 55),
143871
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T)u").WithLocation(18, 62),
143877
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T)u").WithLocation(20, 64),
143883
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(U)t").WithLocation(21, 55),
143889
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(U)t").WithLocation(22, 62),
143898
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(U)t").WithLocation(24, 64),
143904
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(U)(object)t").WithLocation(25, 43),
143927
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(4, 46),
143930
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(5, 52),
143936
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T)t").WithLocation(6, 46),
143939
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T)u").WithLocation(7, 52));
143945
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(4, 46),
143948
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(5, 52),
143954
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T)t").WithLocation(6, 46),
143960
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T)u").WithLocation(7, 52));
144177
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "d").WithLocation(4, 36),
144180
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "d").WithLocation(5, 52),
144183
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "d").WithLocation(7, 54),
144186
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T)d").WithLocation(8, 36),
144192
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T)d").WithLocation(9, 52),
144195
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T)d").WithLocation(11, 54));
144201
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "d").WithLocation(4, 36),
144204
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "d").WithLocation(5, 52),
144207
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "d").WithLocation(7, 54),
144213
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T)d").WithLocation(8, 36),
144219
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T)d").WithLocation(9, 52),
144225
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T)d").WithLocation(11, 54));
144287
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(5, 46),
144290
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(6, 62),
144293
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(8, 64),
144299
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(dynamic)t").WithLocation(9, 46),
144305
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(dynamic)t").WithLocation(10, 62),
144311
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(dynamic)t").WithLocation(12, 64));
144405
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(9, 16),
144554
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "F<T1>()").WithLocation(8, 16),
144557
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "F<T2>()").WithLocation(12, 16),
144560
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "F<T3>()").WithLocation(16, 16),
144563
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "F<T4>()").WithLocation(20, 16));
144644
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t1").WithLocation(9, 16),
144650
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t2").WithLocation(14, 16),
144656
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t3").WithLocation(19, 16),
144662
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t4").WithLocation(24, 16));
144685
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(9, 16));
144709
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "Identity(F<T>())").WithLocation(7, 25),
144712
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "Identity(F<T>())").WithLocation(8, 43),
144715
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "Identity(F<T>())").WithLocation(9, 41),
144718
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "Identity(F<T>())").WithLocation(10, 42));
144824
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "b ? t : u").WithLocation(6, 67),
144827
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "b ? t : u").WithLocation(7, 67),
144830
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "b ? t : u").WithLocation(8, 78));
144854
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t ?? default").WithLocation(5, 28),
144857
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t ?? default(T)").WithLocation(6, 28),
144860
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t ?? default(U)").WithLocation(7, 43),
144863
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t ?? u").WithLocation(9, 59),
144866
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t ?? u").WithLocation(11, 70));
144890
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t ??= default").WithLocation(5, 28),
144896
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t ??= default(T)").WithLocation(6, 28),
144902
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t ??= default(U)").WithLocation(7, 43),
144908
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t ??= u").WithLocation(9, 59),
144914
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t ??= u").WithLocation(11, 70),
144947
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default(T)").WithLocation(8, 22),
144950
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t2").WithLocation(10, 22),
144953
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default(U)").WithLocation(14, 22),
144956
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u2").WithLocation(16, 22));
145023
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "b switch { false => t, _ => default }").WithLocation(4, 36),
145026
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "b switch { false => default, _ => t }").WithLocation(5, 36),
145029
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "b switch { false => t, _ => default }").WithLocation(6, 52),
145032
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "b switch { false => default, _ => t }").WithLocation(7, 52),
145035
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "b switch { false => t, _ => default }").WithLocation(10, 54),
145038
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "b switch { false => default, _ => t }").WithLocation(11, 54));
145062
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "new[] { t, default }[0]").WithLocation(4, 28),
145065
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "new[] { default, t }[0]").WithLocation(5, 28),
145068
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "new[] { t, default }[0]").WithLocation(6, 44),
145071
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "new[] { default, t }[0]").WithLocation(7, 44),
145074
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "new[] { t, default }[0]").WithLocation(10, 46),
145077
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "new[] { default, t }[0]").WithLocation(11, 46));
145101
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "b ? t : default").WithLocation(4, 36),
145104
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "b ? default : t").WithLocation(5, 36),
145107
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "b ? t : default").WithLocation(6, 52),
145110
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "b ? default : t").WithLocation(7, 52),
145113
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "b ? t : default").WithLocation(10, 54),
145116
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "b ? default : t").WithLocation(11, 54));
145141
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default").WithLocation(5, 74),
145144
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default").WithLocation(6, 64),
145147
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default").WithLocation(7, 90),
145150
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default").WithLocation(8, 80),
145153
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default").WithLocation(11, 92),
145156
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default").WithLocation(12, 82));
145184
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default(T)").WithLocation(11, 24),
145187
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "y").WithLocation(13, 25));
145213
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "b ? Get<T>() : default").WithLocation(8, 31),
145216
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "b ? default : Get<T>()").WithLocation(9, 31),
145219
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "false ? Get<T>() : default").WithLocation(10, 25),
145222
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "true ? default : Get<T>()").WithLocation(13, 25));
145531
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t1").WithLocation(7, 16),
145534
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t2").WithLocation(13, 16));
149199
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default(T1)").WithLocation(4, 27),
149202
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default(T2)").WithLocation(5, 44),
149205
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default(T3)").WithLocation(6, 45),
149208
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default(T4)").WithLocation(7, 46));
149235
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default(T1?)").WithLocation(4, 27),
149238
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default(T2?)").WithLocation(5, 44),
149241
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default(T3?)").WithLocation(6, 45),
149244
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default(T4?)").WithLocation(7, 46));
149297
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "default").WithLocation(10, 30),
149623
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(5, 41),
149626
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(8, 41),
149629
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(9, 42));
149648
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(5, 41),
149651
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(8, 41),
149654
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(9, 42));
149673
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(5, 41),
149676
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(8, 41),
149679
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(9, 42));
149698
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(5, 41),
149701
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(8, 41),
149704
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(9, 42));
149724
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(6, 41),
149727
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(9, 41),
149730
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(10, 42));
149750
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(6, 41),
149753
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(9, 41),
149756
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(10, 42));
149777
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(7, 26));
149797
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(4, 33),
149800
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(6, 34));
149815
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(6, 50));
149830
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(4, 50),
149833
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(6, 51));
149848
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(6, 51));
149863
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(6, 52));
149887
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(6, 41),
149890
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(9, 41),
149893
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(10, 42));
149917
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(8, 48),
149920
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(9, 49));
149939
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(5, 49),
149942
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(8, 49),
149945
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(9, 50));
149964
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(8, 50),
149967
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(9, 51));
149987
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(9, 44),
149990
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(10, 45));
150010
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(6, 45),
150013
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(9, 45),
150016
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(10, 46));
150048
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "v").WithLocation(5, 56),
150051
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "v").WithLocation(6, 56),
150054
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "v").WithLocation(7, 57),
150057
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "v").WithLocation(12, 56),
150060
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "v").WithLocation(13, 58),
150063
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "v").WithLocation(14, 58),
150066
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "v").WithLocation(15, 59));
150098
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "v").WithLocation(7, 60),
150101
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "v").WithLocation(8, 59),
150104
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "v").WithLocation(9, 60),
150107
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "v").WithLocation(10, 60),
150110
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "v").WithLocation(11, 61),
150113
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "v").WithLocation(13, 61),
150116
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "v").WithLocation(15, 62),
150119
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "v").WithLocation(16, 61),
150122
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "v").WithLocation(17, 62),
150125
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "v").WithLocation(18, 62),
150128
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "v").WithLocation(19, 63));
150423
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t1").WithLocation(7, 16),
150426
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t2").WithLocation(12, 16),
150429
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t3").WithLocation(17, 16),
150432
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t4").WithLocation(22, 16),
150435
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t5").WithLocation(27, 16));
150491
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "y1").WithLocation(8, 16),
150494
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "y2").WithLocation(14, 16),
150497
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "y3").WithLocation(20, 16),
150500
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "y4").WithLocation(26, 16),
150503
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "y5").WithLocation(32, 16));
150559
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T?)t1").WithLocation(6, 16),
150562
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T?)t2").WithLocation(10, 16),
150565
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T?)t3").WithLocation(14, 16),
150568
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T?)t4").WithLocation(18, 16),
150571
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "(T?)t5").WithLocation(22, 16));
150835
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "new[] { y1, x1 }[0]").WithLocation(6, 23),
150838
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "new[] { x1, y1 }[0]").WithLocation(7, 16),
150841
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "new[] { y2, x2 }[0]").WithLocation(11, 23),
150844
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "new[] { x2, y2 }[0]").WithLocation(12, 16),
150847
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "new[] { y3, x3 }[0]").WithLocation(16, 23),
150850
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "new[] { x3, y3 }[0]").WithLocation(17, 16));
151213
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(7, 16),
151216
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(12, 16),
151219
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(17, 16));
151228
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(7, 16),
151234
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(12, 16),
151240
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "u").WithLocation(17, 16));
151518
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "t").WithLocation(8, 16)
152767
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "s2").WithLocation(23, 20),
152773
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "s2").WithLocation(47, 20));
154531
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "null").WithLocation(15, 43)
156147
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "x").WithLocation(9, 28));
Semantics\NullableReferenceTypesVsPatterns.cs (3)
2417
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "s?.ToString()").WithLocation(8, 80)
2442
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "s?.ToString()").WithLocation(8, 86)
2547
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "s1?.ToString()").WithLocation(12, 35)
Semantics\OverloadResolutionPerfTests.cs (2)
555
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "i65535").WithLocation(65542, 16));
587
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "value").WithLocation(16395, 16));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\Source\NullablePublicAPITests.cs (1)
4777
Diagnostic(ErrorCode.
WRN_NullReferenceReturn
, "z2").WithLocation(17, 16));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Diagnostics\DiagnosticTest.cs (1)
322
case ErrorCode.
WRN_NullReferenceReturn
: