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