43 references to ERR_ListPatternRequiresLength
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder_Patterns.cs (1)
379
Error(diagnostics, ErrorCode.
ERR_ListPatternRequiresLength
, node, inputType);
Errors\ErrorFacts.cs (1)
2238
or ErrorCode.
ERR_ListPatternRequiresLength
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (40)
Semantics\ExtensionTests.cs (3)
23191
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[1]").WithArguments("C").WithLocation(1, 16),
23307
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[_, .. var x]").WithArguments("C").WithLocation(1, 16),
23964
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, @"[""hi""]").WithArguments("C").WithLocation(1, 33)
Semantics\InlineArrayTests.cs (1)
11518
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[0, ..]").WithArguments("Buffer10<int>").WithLocation(12, 20),
Semantics\PatternMatchingTests_ListPatterns.cs (28)
930
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, listPattern).WithArguments("object"),
3837
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[1]").WithArguments("C").WithLocation(8, 21),
3867
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[1]").WithArguments("C").WithLocation(9, 21),
3897
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[1]").WithArguments("C").WithLocation(9, 21)
4695
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[var item, ..var rest]").WithArguments("C").WithLocation(6, 24),
4922
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[var item, ..var rest]").WithArguments("C").WithLocation(6, 24),
6148
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[..]").WithArguments("C").WithLocation(4, 5),
6178
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[..]").WithArguments("C").WithLocation(4, 5),
7832
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("C").WithLocation(2, 16),
7981
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[var x, .. var y]").WithArguments("C").WithLocation(2, 16),
8506
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[var x, .. var y]").WithArguments("INotCountable").WithLocation(2, 34),
8564
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[var x, .. var y]").WithArguments("(int, int)").WithLocation(2, 15),
8627
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16),
8630
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[..]").WithArguments("S").WithLocation(3, 16),
8633
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[0, .. var x, 1]").WithArguments("S").WithLocation(4, 16)
8652
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16),
8675
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16)
8695
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16)
8715
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16)
8735
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16)
8755
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16)
8775
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16)
8795
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16)
8815
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("S").WithLocation(2, 16),
8848
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[1]").WithArguments("bool").WithLocation(4, 27),
8863
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[true]").WithArguments("bool").WithLocation(13, 29),
8900
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[true]").WithArguments("bool").WithLocation(4, 34),
8912
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[true]").WithArguments("bool").WithLocation(8, 35),
Semantics\PatternMatchingTests_NullableTypes.cs (1)
73
Diagnostic(ErrorCode.
ERR_ListPatternRequiresLength
, "[]").WithArguments("int").WithLocation(12, 32),
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),