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