43 references to ERR_ListPatternRequiresLength
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder_Patterns.cs (1)
390
Error(diagnostics, ErrorCode.
ERR_ListPatternRequiresLength
, node, inputType);
Errors\ErrorFacts.cs (1)
2237
or ErrorCode.
ERR_ListPatternRequiresLength
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (40)
Semantics\ExtensionTests.cs (3)
27417
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[1]").WithArguments("C").WithLocation(1, 16),
27533
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[_, .. var x]").WithArguments("C").WithLocation(1, 16),
28190
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 (28)
931
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, listPattern).WithArguments("object"),
3904
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[1]").WithArguments("C").WithLocation(8, 21),
3934
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[1]").WithArguments("C").WithLocation(9, 21),
3964
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[1]").WithArguments("C").WithLocation(9, 21)
4762
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[var item, ..var rest]").WithArguments("C").WithLocation(6, 24),
4989
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[var item, ..var rest]").WithArguments("C").WithLocation(6, 24),
6281
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[..]").WithArguments("C").WithLocation(4, 5),
6311
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[..]").WithArguments("C").WithLocation(4, 5),
8020
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("C").WithLocation(2, 16),
8169
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[var x, .. var y]").WithArguments("C").WithLocation(2, 16),
8694
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[var x, .. var y]").WithArguments("INotCountable").WithLocation(2, 34),
8752
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[var x, .. var y]").WithArguments("(int, int)").WithLocation(2, 15),
8815
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16),
8818
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[..]").WithArguments("S").WithLocation(3, 16),
8821
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[0, .. var x, 1]").WithArguments("S").WithLocation(4, 16)
8840
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16),
8863
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16)
8883
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16)
8903
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16)
8923
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16)
8943
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16)
8963
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16)
8983
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16)
9003
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16),
9036
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[1]").WithArguments("bool").WithLocation(4, 27),
9051
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[true]").WithArguments("bool").WithLocation(13, 29),
9088
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[true]").WithArguments("bool").WithLocation(4, 34),
9100
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[true]").WithArguments("bool").WithLocation(8, 35),
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),