52 references to ERR_UnsupportedPrimaryConstructorParameterCapturingRef
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder_Expressions.cs (1)
2194
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)
13684
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(6, 13),
13687
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(6, 17),
13690
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(6, 23),
13693
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(11, 13),
13696
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(11, 19),
13699
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(11, 30),
13702
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(16, 13),
13705
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(16, 24),
13708
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(16, 28),
13711
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(21, 13),
13714
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(26, 13),
13717
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(31, 13)
14211
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(6, 13),
14214
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(6, 17),
14217
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(6, 23),
14220
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(11, 13),
14223
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(11, 19),
14226
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(11, 30),
14229
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(16, 13),
14232
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(16, 24),
14235
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(16, 28),
14238
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(21, 13),
14241
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(26, 13),
14244
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(31, 13)
14294
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(6, 13),
14297
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(6, 17),
14300
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(6, 23),
14303
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(11, 13),
14306
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(11, 19),
14309
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(11, 30),
14312
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(16, 13),
14315
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(16, 24),
14318
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(16, 28),
14321
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(21, 13),
14324
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(26, 13),
14327
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(31, 13)
14814
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(7, 9),
14820
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(11, 9),
14823
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "z").WithArguments("z").WithLocation(15, 9)
15241
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(7, 9),
15247
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(11, 9),
15250
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "z").WithArguments("z").WithLocation(15, 9)
15612
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(4, 37)
16256
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "p1").WithArguments("p1").WithLocation(8, 13)
16282
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "p1").WithArguments("p1").WithLocation(8, 13)
20024
("0001", BadReference, "(ref int p1) { void M1() { p1 = 1; } }", ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
),
20027
("0004", BadReference, "(in int p1) { void M1() { p1.ToString(); } }", ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
),
20030
("0007", BadReference, "(out int p1) { int x = p1 = 0; void M1() { p1 = 1; } }", ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
),
20145
case ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
:
20149
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "p1").WithArguments("p1").WithLocation(2000, 1)