91 references to ERR_PatternNullableType
Microsoft.CodeAnalysis.CSharp (3)
Binder\Binder_Patterns.cs (2)
755
Error(diagnostics, ErrorCode.
ERR_PatternNullableType
, typeSyntax, patternType.GetNullableUnderlyingType());
760
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)
39
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(7, 20),
42
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string?").WithArguments("string").WithLocation(7, 28),
45
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(8, 20),
51
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string?").WithArguments("string").WithLocation(8, 31),
57
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(9, 20),
60
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(10, 20),
63
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(11, 20),
72
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(12, 20),
108
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(7, 20),
111
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string[]?").WithArguments("string[]").WithLocation(7, 30),
114
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(8, 20),
120
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string[]?").WithArguments("string[]").WithLocation(8, 33),
126
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(9, 20),
129
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(10, 20),
132
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(11, 20),
141
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(12, 20),
191
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(12, 18),
194
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task?").WithArguments("System.Threading.Tasks.Task").WithLocation(14, 18),
218
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(20, 18),
221
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task?").WithArguments("System.Threading.Tasks.Task").WithLocation(22, 18),
224
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(24, 18),
227
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task?").WithArguments("System.Threading.Tasks.Task").WithLocation(26, 18),
230
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(28, 19),
233
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task?").WithArguments("System.Threading.Tasks.Task").WithLocation(30, 19));
280
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(12, 18),
283
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task[]?").WithArguments("System.Threading.Tasks.Task[]").WithLocation(14, 18),
304
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(20, 18),
307
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task[]?").WithArguments("System.Threading.Tasks.Task[]").WithLocation(22, 18),
310
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(24, 18),
313
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task[]?").WithArguments("System.Threading.Tasks.Task[]").WithLocation(26, 18),
316
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(28, 19),
319
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task[]?").WithArguments("System.Threading.Tasks.Task[]").WithLocation(30, 19));
356
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(12, 13),
359
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task?").WithArguments("System.Threading.Tasks.Task").WithLocation(13, 13),
386
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(16, 13),
389
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task?").WithArguments("System.Threading.Tasks.Task").WithLocation(17, 13),
392
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(18, 13),
395
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task?").WithArguments("System.Threading.Tasks.Task").WithLocation(19, 13),
398
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(20, 14),
401
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task?").WithArguments("System.Threading.Tasks.Task").WithLocation(21, 14));
438
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(12, 13),
441
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task[]?").WithArguments("System.Threading.Tasks.Task[]").WithLocation(13, 13),
468
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(16, 13),
471
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task[]?").WithArguments("System.Threading.Tasks.Task[]").WithLocation(17, 13),
474
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(18, 13),
477
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task[]?").WithArguments("System.Threading.Tasks.Task[]").WithLocation(19, 13),
480
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(20, 14),
483
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "Task[]?").WithArguments("System.Threading.Tasks.Task[]").WithLocation(21, 14));
516
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(13, 26),
519
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(14, 26),
522
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(15, 26),
525
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string?").WithArguments("string").WithLocation(15, 34),
528
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(16, 26),
534
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string?").WithArguments("string").WithLocation(16, 37),
540
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(17, 26),
543
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string?").WithArguments("string").WithLocation(17, 39),
546
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(18, 26),
549
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string?").WithArguments("string").WithLocation(18, 42));
582
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(13, 26),
585
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(14, 26),
588
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(15, 26),
591
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string[]?").WithArguments("string[]").WithLocation(15, 36),
594
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(16, 26),
600
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string[]?").WithArguments("string[]").WithLocation(16, 39),
606
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(17, 26),
609
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string[]?").WithArguments("string[]").WithLocation(17, 41),
612
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int[]?").WithArguments("int[]").WithLocation(18, 26),
615
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string[]?").WithArguments("string[]").WithLocation(18, 44));
639
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string?").WithArguments("string").WithLocation(7, 22),
642
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string?").WithArguments("string").WithLocation(8, 22),
645
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string?").WithArguments("string").WithLocation(9, 22));
669
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string[]?").WithArguments("string[]").WithLocation(7, 22),
672
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string[]?").WithArguments("string[]").WithLocation(8, 22),
675
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string[]?").WithArguments("string[]").WithLocation(9, 22));
Semantics\PatternMatchingTests2.cs (6)
2721
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string?").WithArguments("string").WithLocation(4, 22),
2724
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string?").WithArguments("string").WithLocation(7, 23),
2730
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string?").WithArguments("string").WithLocation(13, 22),
2733
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "string?").WithArguments("string").WithLocation(16, 23));
3045
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(6, 25),
3048
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "int?").WithArguments("int").WithLocation(7, 24)
Semantics\PatternMatchingTests4.cs (3)
3780
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "A?").WithArguments("A").WithLocation(8, 18),
3789
Diagnostic(ErrorCode.
ERR_PatternNullableType
, "A[]?").WithArguments("A[]").WithLocation(10, 18),
3798
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));