94 references to ERR_RefLocalOrParamExpected
Microsoft.CodeAnalysis.CSharp (17)
Binder\Binder.ValueChecks.cs (16)
774
if (errorCode is ErrorCode.ERR_InvalidAddrOp or ErrorCode.
ERR_RefLocalOrParamExpected
)
810
Error(diagnostics, ErrorCode.
ERR_RefLocalOrParamExpected
, node);
822
Error(diagnostics, ErrorCode.
ERR_RefLocalOrParamExpected
, node);
847
Error(diagnostics, ErrorCode.
ERR_RefLocalOrParamExpected
, node);
933
Error(diagnostics, ErrorCode.
ERR_RefLocalOrParamExpected
, node);
960
Error(diagnostics, ErrorCode.
ERR_RefLocalOrParamExpected
, node);
984
Error(diagnostics, ErrorCode.
ERR_RefLocalOrParamExpected
, node);
1005
if (errorCode is ErrorCode.ERR_InvalidAddrOp or ErrorCode.ERR_IncrementLvalueExpected or ErrorCode.ERR_RefReturnThis or ErrorCode.
ERR_RefLocalOrParamExpected
or ErrorCode.ERR_RefLvalueExpected)
1074
diagnostics.Add(ErrorCode.
ERR_RefLocalOrParamExpected
, node.Location);
1152
Error(diagnostics, ErrorCode.
ERR_RefLocalOrParamExpected
, node);
1393
Error(diagnostics, ErrorCode.
ERR_RefLocalOrParamExpected
, node);
1702
Error(diagnostics, ErrorCode.
ERR_RefLocalOrParamExpected
, node);
1870
Error(diagnostics, ErrorCode.
ERR_RefLocalOrParamExpected
, node);
3233
return ErrorCode.
ERR_RefLocalOrParamExpected
;
3261
return ErrorCode.
ERR_RefLocalOrParamExpected
;
3305
return ErrorCode.
ERR_RefLocalOrParamExpected
;
Errors\ErrorFacts.cs (1)
1882
or ErrorCode.
ERR_RefLocalOrParamExpected
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (4)
CodeGen\IndexAndRangeTests.cs (4)
1522
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "[1]").WithLocation(2, 22),
1525
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "[^1]").WithLocation(3, 22),
1528
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "b[1]").WithLocation(6, 1),
1531
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)
7919
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "y2! = ref y").WithLocation(8, 10),
Semantics\RefEscapingTests.cs (10)
7108
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(6, 9),
7117
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(8, 9));
7138
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(6, 9),
7144
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(8, 9));
7165
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(6, 9),
7171
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(8, 9));
7194
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(6, 9),
7200
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(8, 9));
7221
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(6, 9),
7227
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(8, 9));
Semantics\RefFieldTests.cs (37)
9948
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "P0").WithLocation(9, 9),
9951
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "P1").WithLocation(10, 9),
9954
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "P2").WithLocation(11, 9),
9957
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "s.P0").WithLocation(23, 9),
9960
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "s.P1").WithLocation(24, 9),
9963
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "s.P2").WithLocation(25, 9));
10019
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "P0").WithLocation(9, 9),
10022
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "P1").WithLocation(10, 9),
10025
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "P2").WithLocation(11, 9),
10028
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "s.P0").WithLocation(20, 9),
10031
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "s.P1").WithLocation(21, 9),
10034
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "s.P2").WithLocation(22, 9));
20758
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "Property").WithLocation(8, 27)
20785
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "Property").WithLocation(8, 27),
20812
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "[0]").WithLocation(2, 19),
20815
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "r2[0]").WithLocation(5, 1)
20839
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "[0]").WithLocation(2, 19),
20842
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "r2[0]").WithLocation(5, 1)
20946
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "Property").WithLocation(7, 27)
20996
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "field").WithLocation(3, 19),
20999
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "r2.field").WithLocation(6, 1)
21022
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "Property").WithLocation(3, 19),
21025
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "r2.Property").WithLocation(6, 1)
21048
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "[0]").WithLocation(3, 19),
21051
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "r2[0]").WithLocation(6, 1)
21082
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "[0]").WithLocation(7, 35),
21085
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "c2.array[0]").WithLocation(15, 9)
21116
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "[0]").WithLocation(9, 37),
21119
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "c2.pointer[0]").WithLocation(17, 9)
21350
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "field").WithLocation(3, 23),
21353
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "s.D.field").WithLocation(6, 1)
21572
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "field").WithLocation(3, 23),
21575
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "r2.field").WithLocation(6, 1)
21601
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "[0]").WithLocation(3, 23),
21604
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "s.D[0]").WithLocation(6, 1)
21628
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "X").WithLocation(4, 36),
21631
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));
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));
1046
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "b ? ref x : ref y").WithLocation(5, 10));
1064
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "x = ref y").WithLocation(5, 10));
4713
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "a").WithLocation(6, 9));
4747
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "array[0]").WithLocation(6, 9));
4775
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "*ptr").WithLocation(6, 9));
4803
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "ptr[0]").WithLocation(6, 9));
4831
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "__refvalue(__makeref(x), int)").WithLocation(6, 9));
4859
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "d[0]").WithLocation(6, 9));
4887
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "d.member").WithLocation(6, 9));