85 references to ERR_RefLocalOrParamExpected
Microsoft.CodeAnalysis.CSharp (15)
Binder\Binder.ValueChecks.cs (14)
601
if (errorCode is ErrorCode.ERR_InvalidAddrOp or ErrorCode.
ERR_RefLocalOrParamExpected
)
637
Error(diagnostics, ErrorCode.
ERR_RefLocalOrParamExpected
, node);
649
Error(diagnostics, ErrorCode.
ERR_RefLocalOrParamExpected
, node);
674
Error(diagnostics, ErrorCode.
ERR_RefLocalOrParamExpected
, node);
772
Error(diagnostics, ErrorCode.
ERR_RefLocalOrParamExpected
, node);
793
if (errorCode is ErrorCode.ERR_InvalidAddrOp or ErrorCode.ERR_IncrementLvalueExpected or ErrorCode.ERR_RefReturnThis or ErrorCode.
ERR_RefLocalOrParamExpected
or ErrorCode.ERR_RefLvalueExpected)
850
diagnostics.Add(ErrorCode.
ERR_RefLocalOrParamExpected
, node.Location);
930
Error(diagnostics, ErrorCode.
ERR_RefLocalOrParamExpected
, node);
1173
Error(diagnostics, ErrorCode.
ERR_RefLocalOrParamExpected
, node);
1458
Error(diagnostics, ErrorCode.
ERR_RefLocalOrParamExpected
, node);
1626
Error(diagnostics, ErrorCode.
ERR_RefLocalOrParamExpected
, node);
2719
return ErrorCode.
ERR_RefLocalOrParamExpected
;
2747
return ErrorCode.
ERR_RefLocalOrParamExpected
;
2791
return ErrorCode.
ERR_RefLocalOrParamExpected
;
Errors\ErrorFacts.cs (1)
1823
case ErrorCode.
ERR_RefLocalOrParamExpected
:
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (70)
Semantics\RecordTests.cs (2)
9653
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "X").WithLocation(15, 28),
9656
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "X").WithLocation(17, 22)
Semantics\RefEscapingTests.cs (10)
5128
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(6, 9),
5137
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(8, 9));
5158
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(6, 9),
5164
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(8, 9));
5185
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(6, 9),
5191
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(8, 9));
5214
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(6, 9),
5220
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(8, 9));
5241
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(6, 9),
5247
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(8, 9));
Semantics\RefFieldTests.cs (37)
9439
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "P0").WithLocation(9, 9),
9442
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "P1").WithLocation(10, 9),
9445
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "P2").WithLocation(11, 9),
9448
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "s.P0").WithLocation(23, 9),
9451
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "s.P1").WithLocation(24, 9),
9454
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "s.P2").WithLocation(25, 9));
9510
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "P0").WithLocation(9, 9),
9513
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "P1").WithLocation(10, 9),
9516
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "P2").WithLocation(11, 9),
9519
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "s.P0").WithLocation(20, 9),
9522
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "s.P1").WithLocation(21, 9),
9525
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "s.P2").WithLocation(22, 9));
20142
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "Property").WithLocation(8, 27)
20169
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "Property").WithLocation(8, 27),
20196
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "[0]").WithLocation(2, 19),
20199
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "r2[0]").WithLocation(5, 1)
20223
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "[0]").WithLocation(2, 19),
20226
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "r2[0]").WithLocation(5, 1)
20330
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "Property").WithLocation(7, 27)
20386
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "field").WithLocation(3, 19),
20389
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "r2.field").WithLocation(6, 1)
20412
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "Property").WithLocation(3, 19),
20415
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "r2.Property").WithLocation(6, 1)
20438
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "[0]").WithLocation(3, 19),
20441
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "r2[0]").WithLocation(6, 1)
20472
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "[0]").WithLocation(7, 35),
20475
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "c2.array[0]").WithLocation(15, 9)
20506
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "[0]").WithLocation(9, 37),
20509
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "c2.pointer[0]").WithLocation(17, 9)
20740
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "field").WithLocation(3, 23),
20743
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "s.D.field").WithLocation(6, 1)
20962
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "field").WithLocation(3, 23),
20965
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "r2.field").WithLocation(6, 1)
20991
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "[0]").WithLocation(3, 23),
20994
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "s.D[0]").WithLocation(6, 1)
21018
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "X").WithLocation(4, 36),
21021
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "a2[y: x, x: x].X").WithLocation(7, 1)
Semantics\RefLocalsAndReturnsTests.cs (21)
180
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(7, 9));
746
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "c").WithLocation(13, 13));
878
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(10, 9),
881
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(13, 9),
884
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(16, 9),
887
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(18, 9),
890
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(21, 9),
893
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(24, 9));
910
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(6, 9));
928
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "_f").WithLocation(7, 9));
946
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "2 + 3").WithLocation(7, 10));
965
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "x").WithLocation(8, 9));
1005
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "M2()").WithLocation(8, 9));
1028
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "P").WithLocation(8, 9));
4318
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "a").WithLocation(6, 9));
4352
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "array[0]").WithLocation(6, 9));
4380
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "*ptr").WithLocation(6, 9));
4408
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "ptr[0]").WithLocation(6, 9));
4436
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "__refvalue(__makeref(x), int)").WithLocation(6, 9));
4464
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "d[0]").WithLocation(6, 9));
4492
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "d.member").WithLocation(6, 9));