52 references to ERR_UnsupportedPrimaryConstructorParameterCapturingRef
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder_Expressions.cs (1)
2171
Error(diagnostics, ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, node, parameter.Name);
Errors\ErrorFacts.cs (1)
1291
or ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (50)
Semantics\PrimaryConstructorTests.cs (50)
13674
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(6, 13),
13677
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(6, 17),
13680
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(6, 23),
13683
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(11, 13),
13686
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(11, 19),
13689
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(11, 30),
13692
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(16, 13),
13695
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(16, 24),
13698
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(16, 28),
13701
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(21, 13),
13704
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(26, 13),
13707
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(31, 13)
14201
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(6, 13),
14204
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(6, 17),
14207
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(6, 23),
14210
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(11, 13),
14213
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(11, 19),
14216
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(11, 30),
14219
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(16, 13),
14222
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(16, 24),
14225
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(16, 28),
14228
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(21, 13),
14231
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(26, 13),
14234
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(31, 13)
14284
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(6, 13),
14287
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(6, 17),
14290
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(6, 23),
14293
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(11, 13),
14296
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(11, 19),
14299
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(11, 30),
14302
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(16, 13),
14305
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(16, 24),
14308
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(16, 28),
14311
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(21, 13),
14314
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(26, 13),
14317
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(31, 13)
14804
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(7, 9),
14810
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(11, 9),
14813
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "z").WithArguments("z").WithLocation(15, 9)
15231
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(7, 9),
15237
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(11, 9),
15240
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "z").WithArguments("z").WithLocation(15, 9)
15602
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(4, 37)
16246
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "p1").WithArguments("p1").WithLocation(8, 13)
16272
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "p1").WithArguments("p1").WithLocation(8, 13)
20014
("0001", BadReference, "(ref int p1) { void M1() { p1 = 1; } }", ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
),
20017
("0004", BadReference, "(in int p1) { void M1() { p1.ToString(); } }", ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
),
20020
("0007", BadReference, "(out int p1) { int x = p1 = 0; void M1() { p1 = 1; } }", ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
),
20135
case ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
:
20139
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "p1").WithArguments("p1").WithLocation(2000, 1)