94 references to ERR_RefLocalOrParamExpected
Microsoft.CodeAnalysis.CSharp (17)
Binder\Binder.ValueChecks.cs (16)
1017if (errorCode is ErrorCode.ERR_InvalidAddrOp or ErrorCode.ERR_RefLocalOrParamExpected) 1053Error(diagnostics, ErrorCode.ERR_RefLocalOrParamExpected, node); 1065Error(diagnostics, ErrorCode.ERR_RefLocalOrParamExpected, node); 1090Error(diagnostics, ErrorCode.ERR_RefLocalOrParamExpected, node); 1176Error(diagnostics, ErrorCode.ERR_RefLocalOrParamExpected, node); 1203Error(diagnostics, ErrorCode.ERR_RefLocalOrParamExpected, node); 1228Error(diagnostics, ErrorCode.ERR_RefLocalOrParamExpected, node); 1249if (errorCode is ErrorCode.ERR_InvalidAddrOp or ErrorCode.ERR_IncrementLvalueExpected or ErrorCode.ERR_RefReturnThis or ErrorCode.ERR_RefLocalOrParamExpected or ErrorCode.ERR_RefLvalueExpected) 1345diagnostics.Add(ErrorCode.ERR_RefLocalOrParamExpected, node.Location); 1423Error(diagnostics, ErrorCode.ERR_RefLocalOrParamExpected, node); 1664Error(diagnostics, ErrorCode.ERR_RefLocalOrParamExpected, node); 1981Error(diagnostics, ErrorCode.ERR_RefLocalOrParamExpected, node); 2151Error(diagnostics, ErrorCode.ERR_RefLocalOrParamExpected, node); 3522return ErrorCode.ERR_RefLocalOrParamExpected; 3550return ErrorCode.ERR_RefLocalOrParamExpected; 3594return ErrorCode.ERR_RefLocalOrParamExpected;
Errors\ErrorFacts.cs (1)
1889or ErrorCode.ERR_RefLocalOrParamExpected
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (4)
CodeGen\IndexAndRangeTests.cs (4)
1527Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "[1]").WithLocation(2, 22), 1530Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "[^1]").WithLocation(3, 22), 1533Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "b[1]").WithLocation(6, 1), 1536Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "b[^1]").WithLocation(7, 1)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (2)
Semantics\RecordTests.cs (2)
9708Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "X").WithLocation(15, 28), 9711Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "X").WithLocation(17, 22)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (71)
Semantics\NullableReferenceTypesTests.cs (1)
7926Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "y2! = ref y").WithLocation(8, 10),
Semantics\RefEscapingTests.cs (10)
10270Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "this").WithLocation(6, 9), 10279Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "this").WithLocation(8, 9)); 10300Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "this").WithLocation(6, 9), 10306Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "this").WithLocation(8, 9)); 10327Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "this").WithLocation(6, 9), 10333Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "this").WithLocation(8, 9)); 10356Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "this").WithLocation(6, 9), 10362Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "this").WithLocation(8, 9)); 10383Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "this").WithLocation(6, 9), 10389Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "this").WithLocation(8, 9));
Semantics\RefFieldTests.cs (37)
10020Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "P0").WithLocation(9, 9), 10023Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "P1").WithLocation(10, 9), 10026Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "P2").WithLocation(11, 9), 10029Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "s.P0").WithLocation(23, 9), 10032Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "s.P1").WithLocation(24, 9), 10035Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "s.P2").WithLocation(25, 9)); 10091Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "P0").WithLocation(9, 9), 10094Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "P1").WithLocation(10, 9), 10097Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "P2").WithLocation(11, 9), 10100Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "s.P0").WithLocation(20, 9), 10103Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "s.P1").WithLocation(21, 9), 10106Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "s.P2").WithLocation(22, 9)); 20792Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "Property").WithLocation(8, 27) 20819Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "Property").WithLocation(8, 27), 20846Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "[0]").WithLocation(2, 19), 20849Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "r2[0]").WithLocation(5, 1) 20873Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "[0]").WithLocation(2, 19), 20876Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "r2[0]").WithLocation(5, 1) 20980Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "Property").WithLocation(7, 27) 21030Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "field").WithLocation(3, 19), 21033Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "r2.field").WithLocation(6, 1) 21056Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "Property").WithLocation(3, 19), 21059Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "r2.Property").WithLocation(6, 1) 21082Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "[0]").WithLocation(3, 19), 21085Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "r2[0]").WithLocation(6, 1) 21116Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "[0]").WithLocation(7, 35), 21119Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "c2.array[0]").WithLocation(15, 9) 21150Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "[0]").WithLocation(9, 37), 21153Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "c2.pointer[0]").WithLocation(17, 9) 21384Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "field").WithLocation(3, 23), 21387Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "s.D.field").WithLocation(6, 1) 21606Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "field").WithLocation(3, 23), 21609Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "r2.field").WithLocation(6, 1) 21635Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "[0]").WithLocation(3, 23), 21638Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "s.D[0]").WithLocation(6, 1) 21662Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "X").WithLocation(4, 36), 21665Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "a2[y: x, x: x].X").WithLocation(7, 1)
Semantics\RefLocalsAndReturnsTests.cs (23)
180Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "this").WithLocation(7, 9)); 743Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "c").WithLocation(13, 13)); 875Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "this").WithLocation(10, 9), 878Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "this").WithLocation(13, 9), 881Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "this").WithLocation(16, 9), 884Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "this").WithLocation(18, 9), 887Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "this").WithLocation(21, 9), 890Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "this").WithLocation(24, 9)); 907Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "this").WithLocation(6, 9)); 925Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "_f").WithLocation(7, 9)); 943Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "2 + 3").WithLocation(7, 10)); 962Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "x").WithLocation(8, 9)); 1002Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "M2()").WithLocation(8, 9)); 1025Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "P").WithLocation(8, 9)); 1043Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "b ? ref x : ref y").WithLocation(5, 10)); 1061Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "x = ref y").WithLocation(5, 10)); 4707Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "a").WithLocation(6, 9)); 4741Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "array[0]").WithLocation(6, 9)); 4769Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "*ptr").WithLocation(6, 9)); 4797Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "ptr[0]").WithLocation(6, 9)); 4825Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "__refvalue(__makeref(x), int)").WithLocation(6, 9)); 4853Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "d[0]").WithLocation(6, 9)); 4881Diagnostic(ErrorCode.ERR_RefLocalOrParamExpected, "d.member").WithLocation(6, 9));