278 references to ERR_PatternWrongType
Microsoft.CodeAnalysis.CSharp (4)
Binder\Binder_Patterns.cs (3)
881
diagnostics.Add(ErrorCode.
ERR_PatternWrongType
, expression.Syntax.Location, inputType, expression.Display);
1001
diagnostics.Add(ErrorCode.
ERR_PatternWrongType
, expression.Syntax.Location, caseType, expression.Display);
1118
Error(diagnostics, ErrorCode.
ERR_PatternWrongType
, typeSyntax, inputType, patternType);
Errors\ErrorFacts.cs (1)
1752
or ErrorCode.
ERR_PatternWrongType
Microsoft.CodeAnalysis.CSharp.CSharp15.UnitTests (202)
UnionsTests.cs (202)
3108
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "S1").WithArguments("S1", "S1").WithLocation(44, 26),
3111
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "S1").WithArguments("S1", "S1").WithLocation(49, 26)
5472
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("C1", "C3").WithLocation(101, 25),
5475
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(102, 25),
5478
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(103, 24),
5484
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("C1", "C3").WithLocation(201, 25),
5487
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(202, 25),
5490
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(203, 24)
5541
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("string", "int").WithLocation(401, 29),
5544
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "byte").WithArguments("S1", "byte").WithLocation(402, 29),
5547
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "byte").WithArguments("S1", "byte").WithLocation(403, 24),
5550
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("string", "int").WithLocation(501, 29),
5553
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "byte").WithArguments("S1", "byte").WithLocation(502, 29),
5556
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "byte").WithArguments("S1", "byte").WithLocation(503, 24)
5613
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "byte").WithArguments("S1", "byte").WithLocation(404, 18),
5616
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "byte").WithArguments("S1", "byte").WithLocation(504, 18)
5661
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "long").WithArguments("S1", "long").WithLocation(400, 18),
5664
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "long").WithArguments("S1", "long").WithLocation(500, 18)
5718
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("C1", "C3").WithLocation(201, 25),
5721
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(202, 25),
5724
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(203, 18),
5730
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("C1", "C3").WithLocation(301, 25),
5733
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(302, 25),
5736
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(303, 18)
5788
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("C1", "C3").WithLocation(1001, 28),
5791
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(1002, 28),
5797
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("C1", "C3").WithLocation(2001, 28),
5800
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(2002, 28)
5851
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("C1", "C3").WithLocation(301, 25),
5854
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(302, 25),
5857
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(303, 18),
5860
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("C1", "C3").WithLocation(401, 25),
5863
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(402, 25),
5866
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(403, 18)
5918
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("C1", "C3").WithLocation(901, 27),
5921
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(902, 27),
5927
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("C1", "C3").WithLocation(951, 27),
5930
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(952, 27)
5977
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(501, 29),
5980
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(601, 29)
6031
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("C1", "C3").WithLocation(701, 29),
6034
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(702, 29),
6037
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(703, 22),
6040
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("C1", "C3").WithLocation(801, 29),
6043
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(802, 29),
6046
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(803, 22)
6093
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(601, 31),
6096
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(701, 31)
6147
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("C1", "C3").WithLocation(801, 30),
6150
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(802, 30),
6153
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(803, 23),
6156
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("C1", "C3").WithLocation(901, 30),
6159
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(902, 30),
6162
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(903, 23)
6223
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(1101, 25),
6238
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(2101, 25)
6294
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(101, 33),
6297
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C4").WithArguments("S1", "C4").WithLocation(201, 33)
6342
Diagnostic(ErrorCode.
ERR_PatternWrongType
, @"""1""").WithArguments("C1", "string").WithLocation(100, 25),
6357
Diagnostic(ErrorCode.
ERR_PatternWrongType
, @"""1""").WithArguments("C1", "string").WithLocation(103, 41),
6366
Diagnostic(ErrorCode.
ERR_PatternWrongType
, @"""1""").WithArguments("C1", "string").WithLocation(104, 18),
6414
Diagnostic(ErrorCode.
ERR_PatternWrongType
, @"""1""").WithArguments("C1", "string").WithLocation(100, 25),
6429
Diagnostic(ErrorCode.
ERR_PatternWrongType
, @"""1""").WithArguments("C1", "string").WithLocation(103, 41),
6438
Diagnostic(ErrorCode.
ERR_PatternWrongType
, @"""1""").WithArguments("C1", "string").WithLocation(104, 18),
6482
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C2").WithArguments("S1", "C2").WithLocation(100, 27),
6485
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "byte").WithArguments("int", "byte").WithLocation(101, 24),
6488
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C2").WithArguments("S1", "C2").WithLocation(200, 27),
6491
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "byte").WithArguments("int", "byte").WithLocation(201, 24)
6654
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "1").WithArguments("C1", "int").WithLocation(100, 27),
6666
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "1").WithArguments("C1", "int").WithLocation(102, 43),
6675
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "1").WithArguments("C1", "int").WithLocation(103, 20),
6722
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "1").WithArguments("C1", "int").WithLocation(100, 27),
6734
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "1").WithArguments("C1", "int").WithLocation(102, 43),
6743
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "1").WithArguments("C1", "int").WithLocation(103, 20),
6785
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "byte").WithArguments("int", "byte").WithLocation(100, 26),
6788
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "byte").WithArguments("int", "byte").WithLocation(200, 26)
6830
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(100, 18),
6833
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S1", "string").WithLocation(100, 25),
6836
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S1", "C3").WithLocation(100, 35),
6839
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(101, 18),
6842
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S1", "string").WithLocation(101, 26),
6845
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S1", "C3").WithLocation(101, 36),
6848
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S1", "string").WithLocation(102, 24),
6851
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S1", "C3").WithLocation(102, 34),
6854
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(103, 18),
6857
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S1", "C3").WithLocation(103, 31),
6860
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(104, 18),
6863
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S1", "string").WithLocation(104, 25),
6866
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(105, 18),
6869
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S1", "C3").WithLocation(105, 32),
6872
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(106, 18),
6875
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S1", "string").WithLocation(106, 26),
6878
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(107, 19),
6881
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S1", "string").WithLocation(107, 26),
6884
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S1", "C3").WithLocation(107, 37)
6926
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(100, 18),
6929
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S1", "string").WithLocation(100, 25),
6932
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S1", "C3").WithLocation(100, 35),
6935
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(101, 18),
6938
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S1", "string").WithLocation(101, 26),
6941
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S1", "C3").WithLocation(101, 36),
6944
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S1", "string").WithLocation(102, 24),
6947
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S1", "C3").WithLocation(102, 34),
6950
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(103, 18),
6953
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S1", "C3").WithLocation(103, 31),
6956
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(104, 18),
6959
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S1", "string").WithLocation(104, 25),
6962
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(105, 18),
6965
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S1", "C3").WithLocation(105, 32),
6968
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(106, 18),
6971
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S1", "string").WithLocation(106, 26),
6974
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(107, 19),
6977
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S1", "string").WithLocation(107, 26),
6980
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S1", "C3").WithLocation(107, 37)
7022
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(100, 26),
7025
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S1", "string").WithLocation(100, 33),
7028
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S1", "C3").WithLocation(100, 43),
7031
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(101, 26),
7034
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S1", "string").WithLocation(101, 34),
7037
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S1", "C3").WithLocation(101, 44),
7040
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S1", "string").WithLocation(102, 32),
7043
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S1", "C3").WithLocation(102, 42),
7046
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(103, 26),
7049
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S1", "C3").WithLocation(103, 39),
7052
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(104, 26),
7055
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S1", "string").WithLocation(104, 33),
7058
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(105, 26),
7061
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S1", "C3").WithLocation(105, 40),
7064
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(106, 26),
7067
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S1", "string").WithLocation(106, 34),
7070
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(107, 27),
7073
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S1", "string").WithLocation(107, 34),
7076
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S1", "C3").WithLocation(107, 45)
7118
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(100, 26),
7121
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S1", "string").WithLocation(100, 33),
7124
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S1", "C3").WithLocation(100, 43),
7127
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(101, 26),
7130
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S1", "string").WithLocation(101, 34),
7133
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S1", "C3").WithLocation(101, 44),
7136
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S1", "string").WithLocation(102, 32),
7139
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S1", "C3").WithLocation(102, 42),
7142
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(103, 26),
7145
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S1", "C3").WithLocation(103, 39),
7148
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(104, 26),
7151
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S1", "string").WithLocation(104, 33),
7154
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(105, 26),
7157
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S1", "C3").WithLocation(105, 40),
7160
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(106, 26),
7163
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S1", "string").WithLocation(106, 34),
7166
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(107, 27),
7169
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S1", "string").WithLocation(107, 34),
7172
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S1", "C3").WithLocation(107, 45)
7212
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(100, 26),
7215
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(101, 26),
7218
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(104, 27),
7221
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(105, 25)
7270
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(100, 34),
7273
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S0", "string").WithLocation(100, 42),
7276
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S0", "C3").WithLocation(100, 52),
7279
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(101, 34),
7282
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S0", "string").WithLocation(101, 43),
7285
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S0", "C3").WithLocation(101, 53),
7288
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S0", "int").WithLocation(102, 26),
7291
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S0", "C3").WithLocation(102, 48),
7294
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S0", "int").WithLocation(103, 26),
7297
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S0", "C3").WithLocation(103, 49),
7300
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(104, 35),
7303
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S0", "string").WithLocation(104, 43),
7306
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S0", "C3").WithLocation(104, 54),
7309
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(105, 33),
7312
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S0", "string").WithLocation(105, 40),
7315
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S0", "C3").WithLocation(105, 50)
7364
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(100, 34),
7367
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S0", "string").WithLocation(100, 42),
7370
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S0", "C3").WithLocation(100, 52),
7373
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(101, 34),
7376
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S0", "string").WithLocation(101, 43),
7379
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S0", "C3").WithLocation(101, 53),
7382
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S0", "int").WithLocation(102, 26),
7385
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S0", "C3").WithLocation(102, 48),
7388
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S0", "int").WithLocation(103, 26),
7391
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S0", "C3").WithLocation(103, 49),
7394
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(104, 35),
7397
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S0", "string").WithLocation(104, 43),
7400
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S0", "C3").WithLocation(104, 54),
7403
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(105, 33),
7406
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S0", "string").WithLocation(105, 40),
7409
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S0", "C3").WithLocation(105, 50)
7463
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("S1", "string").WithLocation(100, 25),
7466
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S1", "C3").WithLocation(101, 38),
7469
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S1", "C3").WithLocation(102, 36),
7472
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S1", "C3").WithLocation(200, 32),
7475
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S1", "C3").WithLocation(201, 34),
7478
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S1", "C3").WithLocation(202, 33)
8172
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "C3").WithArguments("S1", "C3").WithLocation(28, 46),
8436
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(100, 27),
8442
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "object").WithArguments("S1", "object").WithLocation(300, 38),
8445
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("S1", "int").WithLocation(400, 27),
8448
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "object").WithArguments("S1", "object").WithLocation(500, 27),
8451
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "object").WithArguments("S1", "object").WithLocation(600, 31),
8454
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "object").WithArguments("S1", "object").WithLocation(700, 43),
8457
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "object").WithArguments("S1", "object").WithLocation(800, 27),
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (57)
FirstClassSpanTests.cs (6)
1102
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "Span<int>").WithArguments("int[]", "System.Span<int>").WithLocation(2, 14));
1121
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "Span<int>").WithArguments("int[]", "System.Span<int>").WithLocation(4, 10));
1165
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "Span<string>").WithArguments("object[]", "System.Span<string>").WithLocation(2, 14));
1184
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "Span<string>").WithArguments("object[]", "System.Span<string>").WithLocation(4, 10));
1228
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "ReadOnlySpan<char>").WithArguments("string", "System.ReadOnlySpan<char>").WithLocation(2, 14));
1247
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "ReadOnlySpan<char>").WithArguments("string", "System.ReadOnlySpan<char>").WithLocation(4, 10));
RefStructInterfacesTests.cs (14)
25336
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "S").WithArguments("I1", "S").WithLocation(6, 19)
25378
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "I1").WithArguments("T", "I1").WithLocation(7, 19),
25381
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "I1").WithArguments("S", "I1").WithLocation(17, 19)
25588
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "U").WithArguments("T", "U").WithLocation(7, 19),
25591
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "U").WithArguments("S", "U").WithLocation(17, 19)
25635
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "U").WithArguments("T", "U").WithLocation(8, 19),
25638
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "U").WithArguments("S", "U").WithLocation(19, 19)
25786
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "S").WithArguments("U", "S").WithLocation(6, 19)
25818
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "S").WithArguments("U", "S").WithLocation(7, 19)
25849
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "S2").WithArguments("S1", "S2").WithLocation(6, 19)
25880
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "U").WithArguments("T", "U").WithLocation(8, 19),
25883
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "T").WithArguments("U", "T").WithLocation(14, 19)
25911
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "T").WithArguments("S", "T").WithLocation(7, 19)
26035
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "S").WithArguments("S1", "S").WithLocation(6, 19)
Semantics\PatternMatchingTests.cs (22)
222
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "long").WithArguments("string", "long").WithLocation(12, 18),
3122
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("long", "string").WithLocation(10, 33),
3125
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int[]").WithArguments("int", "int[]").WithLocation(11, 32)
4754
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("int?", "string").WithLocation(13, 18)
6038
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "long").WithArguments("int?", "long").WithLocation(15, 18),
6187
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "object").WithArguments("System.TypedReference", "object").WithLocation(9, 23),
10607
Diagnostic(ErrorCode.
ERR_PatternWrongType
, @"""""").WithArguments("System.ReadOnlySpan<T>", "string").WithLocation(4, 56),
10610
Diagnostic(ErrorCode.
ERR_PatternWrongType
, @"""""").WithArguments("System.Span<T>", "string").WithLocation(5, 48));
10638
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "ReadOnlySpan<char>").WithArguments("System.ReadOnlySpan<T>", "System.ReadOnlySpan<char>").WithLocation(5, 56),
10641
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "Span<char>").WithArguments("System.Span<T>", "System.Span<char>").WithLocation(6, 48));
10658
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "ReadOnlySpan<char>").WithArguments("System.ReadOnlySpan<T>", "System.ReadOnlySpan<char>").WithLocation(4, 56),
10661
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "Span<char>").WithArguments("System.Span<T>", "System.Span<char>").WithLocation(5, 48));
10680
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "ReadOnlySpan<char>").WithArguments("object", "System.ReadOnlySpan<char>").WithLocation(4, 41),
10683
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "Span<char>").WithArguments("object", "System.Span<char>").WithLocation(5, 41),
10686
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "ReadOnlySpan<char>").WithArguments("System.ValueType", "System.ReadOnlySpan<char>").WithLocation(6, 44),
10689
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "Span<char>").WithArguments("System.ValueType", "System.Span<char>").WithLocation(7, 44));
10708
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "ReadOnlySpan<char>").WithArguments("object", "System.ReadOnlySpan<char>").WithLocation(4, 41),
10711
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "Span<char>").WithArguments("object", "System.Span<char>").WithLocation(5, 41),
10714
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "ReadOnlySpan<char>").WithArguments("System.ValueType", "System.ReadOnlySpan<char>").WithLocation(6, 44),
10717
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "Span<char>").WithArguments("System.ValueType", "System.Span<char>").WithLocation(7, 44));
12281
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "G<int>").WithArguments("G<T>", "G<int>").WithLocation(32, 13),
12284
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "G<object>").WithArguments("G<T>", "G<object>").WithLocation(33, 13)
Semantics\PatternMatchingTests2.cs (5)
801
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("System.ValueTuple<int>", "int").WithLocation(8, 19),
810
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("System.ValueTuple<int>", "int").WithLocation(10, 29));
2012
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "1").WithArguments("C<T>", "int").WithLocation(5, 21)
2686
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "System.Delegate").WithArguments("string", "System.Delegate").WithLocation(5, 19),
2753
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "System.Delegate").WithArguments("string", "System.Delegate").WithLocation(6, 22),
Semantics\PatternMatchingTests4.cs (3)
4900
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "B").WithArguments("A", "B").WithLocation(3, 25),
4915
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "B").WithArguments("A", "B").WithLocation(26, 15),
6256
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "B").WithArguments("A", "B").WithLocation(14, 25),
Semantics\PatternMatchingTests5.cs (6)
2049
Diagnostic(ErrorCode.
ERR_PatternWrongType
, @"""""").WithArguments("T", "string").WithLocation(13, 9)
2096
Diagnostic(ErrorCode.
ERR_PatternWrongType
, @"""""").WithArguments("T", "string").WithLocation(13, 9)
2146
Diagnostic(ErrorCode.
ERR_PatternWrongType
, @"""""").WithArguments("T", "string").WithLocation(13, 9)
2192
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("C", "int").WithLocation(9, 5),
2254
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("C", "int").WithLocation(9, 5),
2318
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("C", "int").WithLocation(9, 5),
Semantics\PatternSwitchTests.cs (1)
351
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "int").WithArguments("string", "int").WithLocation(8, 18)
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (2)
IOperation\IOperationTests_IIsPatternExpression.cs (1)
375
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "X").WithArguments("int?", "X").WithLocation(8, 28)
IOperation\IOperationTests_IPatternSwitchCase.cs (1)
551
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "X").WithArguments("int?", "X").WithLocation(9, 28)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (12)
Semantics\SpanStackSafetyTests.cs (12)
81
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "Span<int>").WithArguments("object", "System.Span<int>").WithLocation(10, 18)
106
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "Span<int>").WithArguments("T", "System.Span<int>").WithLocation(9, 18)
131
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "Span<int>").WithArguments("T", "System.Span<int>").WithLocation(9, 18)
156
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "Span<object>").WithArguments("System.Span<string>", "System.Span<object>").WithLocation(9, 18),
159
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "object").WithArguments("System.Span<string>", "object").WithLocation(11, 18)
182
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "T").WithArguments("System.Span<string>", "T").WithLocation(9, 18)
205
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "T").WithArguments("System.Span<string>", "T").WithLocation(9, 18)
245
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "Span<int>").WithArguments("object", "System.Span<int>").WithLocation(9, 18));
269
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "Span<int>").WithArguments("T", "System.Span<int>").WithLocation(9, 18));
291
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "object").WithArguments("System.Span<int>", "object").WithLocation(8, 18));
313
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "T").WithArguments("System.Span<int>", "T").WithLocation(8, 18));
335
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "T").WithArguments("System.Span<int>", "T").WithLocation(8, 18));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Parsing\PatternParsingTests.cs (1)
59
Diagnostic(ErrorCode.
ERR_PatternWrongType
, "string").WithArguments("int", "string").WithLocation(11, 18),