94 references to ERR_RefLocalOrParamExpected
Microsoft.CodeAnalysis.CSharp (17)
Binder\Binder.ValueChecks.cs (16)
999
if (errorCode is ErrorCode.ERR_InvalidAddrOp or ErrorCode.
ERR_RefLocalOrParamExpected
)
1035
Error(diagnostics, ErrorCode.
ERR_RefLocalOrParamExpected
, node);
1047
Error(diagnostics, ErrorCode.
ERR_RefLocalOrParamExpected
, node);
1072
Error(diagnostics, ErrorCode.
ERR_RefLocalOrParamExpected
, node);
1158
Error(diagnostics, ErrorCode.
ERR_RefLocalOrParamExpected
, node);
1185
Error(diagnostics, ErrorCode.
ERR_RefLocalOrParamExpected
, node);
1209
Error(diagnostics, ErrorCode.
ERR_RefLocalOrParamExpected
, node);
1230
if (errorCode is ErrorCode.ERR_InvalidAddrOp or ErrorCode.ERR_IncrementLvalueExpected or ErrorCode.ERR_RefReturnThis or ErrorCode.
ERR_RefLocalOrParamExpected
or ErrorCode.ERR_RefLvalueExpected)
1299
diagnostics.Add(ErrorCode.
ERR_RefLocalOrParamExpected
, node.Location);
1377
Error(diagnostics, ErrorCode.
ERR_RefLocalOrParamExpected
, node);
1618
Error(diagnostics, ErrorCode.
ERR_RefLocalOrParamExpected
, node);
1927
Error(diagnostics, ErrorCode.
ERR_RefLocalOrParamExpected
, node);
2095
Error(diagnostics, ErrorCode.
ERR_RefLocalOrParamExpected
, node);
3466
return ErrorCode.
ERR_RefLocalOrParamExpected
;
3494
return ErrorCode.
ERR_RefLocalOrParamExpected
;
3538
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)
7926
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "y2! = ref y").WithLocation(8, 10),
Semantics\RefEscapingTests.cs (10)
7689
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(6, 9),
7698
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(8, 9));
7719
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(6, 9),
7725
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(8, 9));
7746
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(6, 9),
7752
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(8, 9));
7775
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(6, 9),
7781
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(8, 9));
7802
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "this").WithLocation(6, 9),
7808
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));
20757
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "Property").WithLocation(8, 27)
20784
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "Property").WithLocation(8, 27),
20811
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "[0]").WithLocation(2, 19),
20814
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "r2[0]").WithLocation(5, 1)
20838
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "[0]").WithLocation(2, 19),
20841
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "r2[0]").WithLocation(5, 1)
20945
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "Property").WithLocation(7, 27)
20995
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "field").WithLocation(3, 19),
20998
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "r2.field").WithLocation(6, 1)
21021
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "Property").WithLocation(3, 19),
21024
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "r2.Property").WithLocation(6, 1)
21047
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "[0]").WithLocation(3, 19),
21050
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "r2[0]").WithLocation(6, 1)
21081
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "[0]").WithLocation(7, 35),
21084
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "c2.array[0]").WithLocation(15, 9)
21115
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "[0]").WithLocation(9, 37),
21118
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "c2.pointer[0]").WithLocation(17, 9)
21349
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "field").WithLocation(3, 23),
21352
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "s.D.field").WithLocation(6, 1)
21571
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "field").WithLocation(3, 23),
21574
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "r2.field").WithLocation(6, 1)
21600
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "[0]").WithLocation(3, 23),
21603
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "s.D[0]").WithLocation(6, 1)
21627
Diagnostic(ErrorCode.
ERR_RefLocalOrParamExpected
, "X").WithLocation(4, 36),
21630
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));