36 references to ERR_ListPatternRequiresLength
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder_Patterns.cs (1)
378
Error(diagnostics, ErrorCode.
ERR_ListPatternRequiresLength
, node, inputType);
Errors\ErrorFacts.cs (1)
2181
case ErrorCode.
ERR_ListPatternRequiresLength
:
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (33)
Semantics\PatternMatchingTests_ListPatterns.cs (26)
931
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, listPattern).WithArguments("object"),
3839
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[1]").WithArguments("C").WithLocation(8, 21),
3869
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[1]").WithArguments("C").WithLocation(9, 21),
3899
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[1]").WithArguments("C").WithLocation(9, 21)
4698
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[var item, ..var rest]").WithArguments("C").WithLocation(6, 24),
4925
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[var item, ..var rest]").WithArguments("C").WithLocation(6, 24),
6155
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[..]").WithArguments("C").WithLocation(4, 5),
6185
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[..]").WithArguments("C").WithLocation(4, 5),
7841
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("C").WithLocation(2, 16),
7991
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[var x, .. var y]").WithArguments("C").WithLocation(2, 16),
8527
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[var x, .. var y]").WithArguments("INotCountable").WithLocation(2, 34),
8585
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[var x, .. var y]").WithArguments("(int, int)").WithLocation(2, 15),
8648
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16),
8651
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[..]").WithArguments("S").WithLocation(3, 16),
8654
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[0, .. var x, 1]").WithArguments("S").WithLocation(4, 16)
8673
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16),
8696
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16)
8716
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16)
8736
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16)
8756
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16)
8776
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16)
8796
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16)
8816
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16)
8836
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16),
8869
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[1]").WithArguments("bool").WithLocation(4, 27),
8884
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[true]").WithArguments("bool").WithLocation(13, 29),
Semantics\PatternMatchingTests5.cs (7)
1992
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("T").WithLocation(11, 9),
2036
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("T").WithLocation(11, 9),
2083
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("T").WithLocation(11, 9),
2133
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("T").WithLocation(11, 9),
2191
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("C").WithLocation(10, 5),
2253
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("C").WithLocation(10, 5),
2317
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),