50 references to ERR_UnsupportedPrimaryConstructorParameterCapturingRef
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder_Expressions.cs (1)
1945
Error(diagnostics, parameter.Type.IsRefLikeType ? ErrorCode.ERR_UnsupportedPrimaryConstructorParameterCapturingRefLike : ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, node, parameter.Name);
Errors\ErrorFacts.cs (1)
1229
case ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
:
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (48)
Semantics\PrimaryConstructorTests.cs (48)
12656
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(6, 13),
12659
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(6, 17),
12662
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(6, 23),
12665
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(11, 13),
12668
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(11, 19),
12671
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(11, 30),
12674
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(16, 13),
12677
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(16, 24),
12680
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(16, 28),
12683
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(21, 13),
12686
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(26, 13),
12689
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(31, 13)
13183
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(6, 13),
13186
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(6, 17),
13189
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(6, 23),
13192
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(11, 13),
13195
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(11, 19),
13198
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(11, 30),
13201
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(16, 13),
13204
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(16, 24),
13207
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(16, 28),
13210
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(21, 13),
13213
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(26, 13),
13216
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(31, 13)
13266
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(6, 13),
13269
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(6, 17),
13272
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(6, 23),
13275
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(11, 13),
13278
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(11, 19),
13281
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(11, 30),
13284
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(16, 13),
13287
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(16, 24),
13290
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(16, 28),
13293
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(21, 13),
13296
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(26, 13),
13299
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(31, 13)
13786
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(7, 9),
13792
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(11, 9),
13795
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "z").WithArguments("z").WithLocation(15, 9)
14213
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(7, 9),
14219
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(11, 9),
14222
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "z").WithArguments("z").WithLocation(15, 9)
14584
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(4, 37)
15154
("0001", BadReference, "(ref int p1) { void M1() { p1 = 1; } }", ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
),
15157
("0004", BadReference, "(in int p1) { void M1() { p1.ToString(); } }", ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
),
15160
("0007", BadReference, "(out int p1) { int x = p1 = 0; void M1() { p1 = 1; } }", ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
),
15275
case ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
:
15279
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "p1").WithArguments("p1").WithLocation(2000, 1)