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