53 references to ERR_ListPatternRequiresLength
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder_Patterns.cs (1)
599
Error(diagnostics, ErrorCode.
ERR_ListPatternRequiresLength
, node, inputType);
Errors\ErrorFacts.cs (1)
2243
or ErrorCode.
ERR_ListPatternRequiresLength
Microsoft.CodeAnalysis.CSharp.CSharp15.UnitTests (6)
UnionsTests.cs (6)
4192
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[10]").WithArguments("object").WithLocation(14, 21),
4198
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[10]").WithArguments("object").WithLocation(19, 21),
6211
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("object").WithLocation(1100, 18),
6217
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("object").WithLocation(1101, 18),
6226
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("object").WithLocation(2100, 18),
6232
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("object").WithLocation(2101, 18),
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (44)
Semantics\ExtensionTests.cs (3)
27773
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[1]").WithArguments("C").WithLocation(1, 16),
27889
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[_, .. var x]").WithArguments("C").WithLocation(1, 16),
28546
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, @"[""hi""]").WithArguments("C").WithLocation(1, 33)
Semantics\InlineArrayTests.cs (1)
11524
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[0, ..]").WithArguments("Buffer10<int>").WithLocation(12, 20),
Semantics\PatternMatchingTests_ListPatterns.cs (32)
931
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, listPattern).WithArguments("object"),
3897
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[1]").WithArguments("C").WithLocation(8, 21),
3927
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[1]").WithArguments("C").WithLocation(9, 21),
3957
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[1]").WithArguments("C").WithLocation(9, 21)
4755
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[var item, ..var rest]").WithArguments("C").WithLocation(6, 24),
4982
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[var item, ..var rest]").WithArguments("C").WithLocation(6, 24),
6274
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[..]").WithArguments("C").WithLocation(4, 5),
6304
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[..]").WithArguments("C").WithLocation(4, 5),
7970
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("C").WithLocation(2, 16),
8119
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[var x, .. var y]").WithArguments("C").WithLocation(2, 16),
8644
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[var x, .. var y]").WithArguments("INotCountable").WithLocation(2, 34),
8702
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[var x, .. var y]").WithArguments("(int, int)").WithLocation(2, 15),
8765
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16),
8768
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[..]").WithArguments("S").WithLocation(3, 16),
8771
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[0, .. var x, 1]").WithArguments("S").WithLocation(4, 16)
8790
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16),
8813
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16)
8833
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16)
8853
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16)
8873
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16)
8893
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16)
8913
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16)
8933
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16)
8953
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16),
8986
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[1]").WithArguments("bool").WithLocation(4, 27),
9001
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[true]").WithArguments("bool").WithLocation(13, 29),
9038
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[true]").WithArguments("bool").WithLocation(4, 34),
9050
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[true]").WithArguments("bool").WithLocation(8, 35),
9504
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("void*").WithLocation(6, 18),
9543
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("void*").WithLocation(6, 18),
9582
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("delegate*<void>").WithLocation(6, 18),
9621
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("delegate*<void>").WithLocation(6, 18),
Semantics\PatternMatchingTests_NullableTypes.cs (1)
75
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("int").WithLocation(12, 32),
Semantics\PatternMatchingTests5.cs (7)
1996
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("T").WithLocation(11, 9),
2040
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("T").WithLocation(11, 9),
2087
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("T").WithLocation(11, 9),
2137
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("T").WithLocation(11, 9),
2195
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("C").WithLocation(10, 5),
2257
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("C").WithLocation(10, 5),
2321
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("C").WithLocation(10, 5),
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (1)
IOperation\IOperationTests_IIsPatternExpression.cs (1)
2324
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("X").WithLocation(8, 31),