85 references to ERR_RefReturnLvalueExpected
Microsoft.CodeAnalysis.CSharp (3)
Binder\Binder.ValueChecks.cs (2)
2788
return ErrorCode.
ERR_RefReturnLvalueExpected
;
2809
return ErrorCode.
ERR_RefReturnLvalueExpected
;
Errors\ErrorFacts.cs (1)
1718
case ErrorCode.
ERR_RefReturnLvalueExpected
:
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (13)
CodeGen\CodeGenFunctionPointersTests.cs (1)
10917
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "ptr(ref i)").WithLocation(8, 16)
CodeGen\CodeGenNullCoalescingAssignmentTests.cs (1)
1360
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, @"o ??= ""Test String""").WithLocation(7, 15)
CodeGen\CodeGenRefConditionalOperatorTests.cs (3)
636
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "42").WithLocation(8, 27),
639
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "42").WithLocation(10, 46)
976
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "()=>1").WithLocation(8, 47)
CodeGen\CodeGenRefReadonlyReturnTests.cs (5)
1048
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "42").WithLocation(6, 25),
1104
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "42").WithLocation(6, 20)
1128
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "42").WithLocation(6, 22),
1155
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "M()").WithLocation(6, 20),
1183
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "b").WithLocation(7, 22),
CodeGen\CodeGenRefReturnTests.cs (3)
2930
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "d.Length").WithLocation(18, 20)
3119
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "d[0]").WithLocation(17, 20)
3155
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "d.Length").WithLocation(14, 26),
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Semantics\PatternMatchingTests3.cs (1)
526
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "b switch { true => x, false => y }").WithLocation(6, 21));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (68)
Semantics\AnonymousFunctionTests.cs (10)
1490
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "() => Write(1)").WithLocation(8, 25),
1493
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "static () => Write(2)").WithLocation(11, 25),
1496
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "() => { Write(3); }").WithLocation(14, 25),
1499
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "static () => { Write(4); }").WithLocation(17, 25),
1502
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "() => { }").WithLocation(20, 33),
1505
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "static () => { }").WithLocation(21, 33),
1508
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "delegate() { Write(5); }").WithLocation(23, 25),
1511
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "static delegate() { Write(6); }").WithLocation(26, 25),
1514
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "delegate() { }").WithLocation(29, 33),
1517
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "static delegate() { }").WithLocation(30, 29)
Semantics\ArglistTests.cs (1)
302
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "__refvalue(tr, int)").WithLocation(23, 20)
Semantics\ImplicitObjectCreationTests.cs (1)
2315
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "new()").WithLocation(6, 20)
Semantics\IndexAndRangeTests.cs (5)
268
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "s[^2]").WithLocation(11, 34));
657
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "arr[0..2]").WithLocation(33, 14),
660
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "arr[0..2]").WithLocation(35, 20));
774
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "^0").WithLocation(6, 14),
780
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "^0").WithLocation(8, 20));
Semantics\InterpolationTests.cs (7)
14362
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, expression).WithLocation(17, 20)
14421
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "s1").WithLocation(17, 16),
14626
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "s1").WithLocation(15, 16),
14671
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "s").WithLocation(17, 15),
15030
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "r").WithLocation(18, 19),
15033
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "r").WithLocation(18, 19),
15075
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "x").WithLocation(18, 25),
Semantics\OverloadResolutionTests.cs (4)
10400
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "2").WithLocation(21, 25)
10497
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "2").WithLocation(31, 23));
10997
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "(rl, rl)").WithLocation(20, 19),
11000
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "(y, x)").WithLocation(22, 19));
Semantics\RawInterpolationTests_Handler.cs (1)
11062
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, expression).WithLocation(17, 20));
Semantics\RefEscapingTests.cs (11)
524
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "MayNotWrap()").WithLocation(21, 30),
673
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "__refvalue(ai.GetNextArg(), int)").WithLocation(24, 20),
796
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "var _").WithLocation(12, 36),
838
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "var _").WithLocation(7, 36));
3613
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "new SW()").WithLocation(18, 13),
4221
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "(global, global) = global").WithLocation(9, 9),
6383
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "ReadOnlyVec").WithLocation(11, 51),
6389
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "ReadOnlyVec").WithLocation(12, 31)
6439
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "ReadOnlyVec").WithLocation(11, 58),
6445
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "ReadOnlyVec").WithLocation(12, 38)
6842
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "__refvalue(ai.GetNextArg(), int)").WithLocation(17, 26),
Semantics\RefFieldTests.cs (11)
686
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "default").WithLocation(7, 34),
4964
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "__refvalue(args.GetNextArg(), int)").WithLocation(7, 20));
5090
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "3").WithLocation(19, 22));
5141
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "3").WithLocation(22, 22));
10267
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "MayCaptureDefaultArg()").WithLocation(10, 16),
10329
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "new object()").WithLocation(10, 23));
19665
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "2").WithLocation(14, 18));
27928
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "2").WithLocation(5, 28));
27988
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "stackalloc int[1]").WithLocation(4, 39));
29276
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "_").WithLocation(5, 27));
29304
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "_").WithLocation(6, 27));
Semantics\RefLocalsAndReturnsTests.cs (16)
1113
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "42").WithLocation(6, 34));
1422
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "rp").WithLocation(7, 20));
1637
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "2 + 2").WithLocation(6, 20),
1640
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "2").WithLocation(11, 20),
1643
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "null").WithLocation(16, 20),
1646
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "VoidMethod()").WithLocation(23, 20),
1649
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "P1").WithLocation(30, 20)
1678
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "2 + 2").WithLocation(9, 27),
1681
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "2").WithLocation(10, 27),
1684
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "null").WithLocation(11, 27),
1687
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "VoidMethod()").WithLocation(12, 27),
1690
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "P1").WithLocation(13, 27));
3566
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "P").WithLocation(8, 20));
3587
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "this[0]").WithLocation(8, 20));
3707
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "L()").WithLocation(11, 20));
3728
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, "d()").WithLocation(8, 20));
Semantics\Utf8StringsLiteralsTests.cs (1)
3784
Diagnostic(ErrorCode.
ERR_RefReturnLvalueExpected
, @"""cat""u8").WithLocation(7, 26)