52 references to ERR_UnsupportedPrimaryConstructorParameterCapturingRef
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder_Expressions.cs (1)
2130
Error(diagnostics, ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, node, parameter.Name);
Errors\ErrorFacts.cs (1)
1293
or ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (50)
Semantics\PrimaryConstructorTests.cs (50)
13814
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(6, 13),
13817
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(6, 17),
13820
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(6, 23),
13823
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(11, 13),
13826
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(11, 19),
13829
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(11, 30),
13832
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(16, 13),
13835
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(16, 24),
13838
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(16, 28),
13841
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(21, 13),
13844
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(26, 13),
13847
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(31, 13)
14341
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(6, 13),
14344
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(6, 17),
14347
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(6, 23),
14350
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(11, 13),
14353
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(11, 19),
14356
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(11, 30),
14359
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(16, 13),
14362
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(16, 24),
14365
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(16, 28),
14368
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(21, 13),
14371
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(26, 13),
14374
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(31, 13)
14424
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(6, 13),
14427
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(6, 17),
14430
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(6, 23),
14433
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(11, 13),
14436
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(11, 19),
14439
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(11, 30),
14442
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(16, 13),
14445
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(16, 24),
14448
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(16, 28),
14451
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(21, 13),
14454
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "s").WithArguments("s").WithLocation(26, 13),
14457
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(31, 13)
14944
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(7, 9),
14950
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(11, 9),
14953
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "z").WithArguments("z").WithLocation(15, 9)
15371
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(7, 9),
15377
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "y").WithArguments("y").WithLocation(11, 9),
15380
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "z").WithArguments("z").WithLocation(15, 9)
15742
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "x").WithArguments("x").WithLocation(4, 37)
16386
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "p1").WithArguments("p1").WithLocation(8, 13)
16412
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "p1").WithArguments("p1").WithLocation(8, 13)
20154
("0001", BadReference, "(ref int p1) { void M1() { p1 = 1; } }", ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
),
20157
("0004", BadReference, "(in int p1) { void M1() { p1.ToString(); } }", ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
),
20160
("0007", BadReference, "(out int p1) { int x = p1 = 0; void M1() { p1 = 1; } }", ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
),
20275
case ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
:
20279
Diagnostic(ErrorCode.
ERR_UnsupportedPrimaryConstructorParameterCapturingRef
, "p1").WithArguments("p1").WithLocation(2000, 1)