91 references to ERR_PatternNullableType
Microsoft.CodeAnalysis.CSharp (3)
Binder\Binder_Patterns.cs (2)
744
Error(diagnostics, ErrorCode.
ERR_PatternNullableType
, typeSyntax, patternType.GetNullableUnderlyingType());
749
Error(diagnostics, ErrorCode.
ERR_PatternNullableType
, typeSyntax, patternType);
Errors\ErrorFacts.cs (1)
1741
or ErrorCode.
ERR_PatternNullableType
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (85)
Semantics\PatternMatchingTests.cs (2)
145
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Nullable<int>").WithArguments("int").WithLocation(11, 18)
219
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "NullableInt").WithArguments("int").WithLocation(11, 18),
Semantics\PatternMatchingTests_NullableTypes.cs (74)
37
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(7, 20),
40
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string?").WithArguments("string").WithLocation(7, 28),
43
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(8, 20),
49
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string?").WithArguments("string").WithLocation(8, 31),
55
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(9, 20),
58
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(10, 20),
61
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(11, 20),
70
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(12, 20),
106
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(7, 20),
109
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string[]?").WithArguments("string[]").WithLocation(7, 30),
112
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(8, 20),
118
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string[]?").WithArguments("string[]").WithLocation(8, 33),
124
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(9, 20),
127
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(10, 20),
130
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(11, 20),
139
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(12, 20),
189
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(12, 18),
192
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task?").WithArguments("System.Threading.Tasks.Task").WithLocation(14, 18),
216
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(20, 18),
219
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task?").WithArguments("System.Threading.Tasks.Task").WithLocation(22, 18),
222
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(24, 18),
225
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task?").WithArguments("System.Threading.Tasks.Task").WithLocation(26, 18),
228
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(28, 19),
231
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task?").WithArguments("System.Threading.Tasks.Task").WithLocation(30, 19));
278
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(12, 18),
281
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task[]?").WithArguments("System.Threading.Tasks.Task[]").WithLocation(14, 18),
302
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(20, 18),
305
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task[]?").WithArguments("System.Threading.Tasks.Task[]").WithLocation(22, 18),
308
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(24, 18),
311
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task[]?").WithArguments("System.Threading.Tasks.Task[]").WithLocation(26, 18),
314
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(28, 19),
317
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task[]?").WithArguments("System.Threading.Tasks.Task[]").WithLocation(30, 19));
354
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(12, 13),
357
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task?").WithArguments("System.Threading.Tasks.Task").WithLocation(13, 13),
384
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(16, 13),
387
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task?").WithArguments("System.Threading.Tasks.Task").WithLocation(17, 13),
390
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(18, 13),
393
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task?").WithArguments("System.Threading.Tasks.Task").WithLocation(19, 13),
396
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(20, 14),
399
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task?").WithArguments("System.Threading.Tasks.Task").WithLocation(21, 14));
436
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(12, 13),
439
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task[]?").WithArguments("System.Threading.Tasks.Task[]").WithLocation(13, 13),
466
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(16, 13),
469
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task[]?").WithArguments("System.Threading.Tasks.Task[]").WithLocation(17, 13),
472
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(18, 13),
475
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task[]?").WithArguments("System.Threading.Tasks.Task[]").WithLocation(19, 13),
478
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(20, 14),
481
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task[]?").WithArguments("System.Threading.Tasks.Task[]").WithLocation(21, 14));
514
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(13, 26),
517
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(14, 26),
520
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(15, 26),
523
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string?").WithArguments("string").WithLocation(15, 34),
526
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(16, 26),
532
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string?").WithArguments("string").WithLocation(16, 37),
538
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(17, 26),
541
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string?").WithArguments("string").WithLocation(17, 39),
544
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(18, 26),
547
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string?").WithArguments("string").WithLocation(18, 42));
580
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(13, 26),
583
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(14, 26),
586
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(15, 26),
589
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string[]?").WithArguments("string[]").WithLocation(15, 36),
592
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(16, 26),
598
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string[]?").WithArguments("string[]").WithLocation(16, 39),
604
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(17, 26),
607
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string[]?").WithArguments("string[]").WithLocation(17, 41),
610
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(18, 26),
613
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string[]?").WithArguments("string[]").WithLocation(18, 44));
637
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string?").WithArguments("string").WithLocation(7, 22),
640
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string?").WithArguments("string").WithLocation(8, 22),
643
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string?").WithArguments("string").WithLocation(9, 22));
667
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string[]?").WithArguments("string[]").WithLocation(7, 22),
670
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string[]?").WithArguments("string[]").WithLocation(8, 22),
673
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string[]?").WithArguments("string[]").WithLocation(9, 22));
Semantics\PatternMatchingTests2.cs (6)
2704
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string?").WithArguments("string").WithLocation(4, 22),
2707
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string?").WithArguments("string").WithLocation(7, 23),
2713
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string?").WithArguments("string").WithLocation(13, 22),
2716
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string?").WithArguments("string").WithLocation(16, 23));
3028
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(6, 25),
3031
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(7, 24)
Semantics\PatternMatchingTests4.cs (3)
3781
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "A?").WithArguments("A").WithLocation(8, 18),
3790
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "A[]?").WithArguments("A[]").WithLocation(10, 18),
3799
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "A[][]?").WithArguments("A[][]").WithLocation(12, 18),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
Semantics\NullableTests.cs (3)
2150
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(6, 18));
2172
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "A").WithArguments("int").WithLocation(7, 18));
2194
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "A").WithArguments("int").WithLocation(7, 18));