104 references to ERR_RefLvalueExpected
Microsoft.CodeAnalysis.CSharp (5)
Binder\Binder.ValueChecks.cs (3)
793if (errorCode is ErrorCode.ERR_InvalidAddrOp or ErrorCode.ERR_IncrementLvalueExpected or ErrorCode.ERR_RefReturnThis or ErrorCode.ERR_RefLocalOrParamExpected or ErrorCode.ERR_RefLvalueExpected) 2724return ErrorCode.ERR_RefLvalueExpected; 2796return ErrorCode.ERR_RefLvalueExpected;
Binder\ForEachLoopBinder.cs (1)
231Error(diagnostics, ErrorCode.ERR_RefLvalueExpected, collectionExpr.Syntax);
Errors\ErrorFacts.cs (1)
1147case ErrorCode.ERR_RefLvalueExpected:
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (12)
CodeGen\CodeGenAwaitForeachTests.cs (2)
7062Diagnostic(ErrorCode.ERR_RefLvalueExpected, "new C()").WithLocation(8, 33)); 7095Diagnostic(ErrorCode.ERR_RefLvalueExpected, "c").WithLocation(9, 33)
CodeGen\CodeGenDeconstructTests.cs (1)
2466Diagnostic(ErrorCode.ERR_RefLvalueExpected, "(x, y) = c").WithLocation(10, 9)
CodeGen\CodeGenForEachTests.cs (2)
4174Diagnostic(ErrorCode.ERR_RefLvalueExpected, "new C()").WithLocation(7, 27)); 4206Diagnostic(ErrorCode.ERR_RefLvalueExpected, "c").WithLocation(8, 27)
CodeGen\CodeGenRefLocalTests.cs (1)
3369Diagnostic(ErrorCode.ERR_RefLvalueExpected, "{1,2,3}"),
CodeGen\CodeGenTupleEqualityTests.cs (2)
5291Diagnostic(ErrorCode.ERR_RefLvalueExpected, "(1, 2) == (3, 4)").WithLocation(8, 15), 5294Diagnostic(ErrorCode.ERR_RefLvalueExpected, "(1, 2) == (3, 4)").WithLocation(8, 37)
CodeGen\UnsafeTests.cs (3)
5038Diagnostic(ErrorCode.ERR_RefLvalueExpected, "new Fixable(1)").WithLocation(6, 25), 10431Diagnostic(ErrorCode.ERR_RefLvalueExpected, "s.i"), 10434Diagnostic(ErrorCode.ERR_RefLvalueExpected, "s.i"));
Emit\CompilationEmitTests.cs (1)
1383Diagnostic(ErrorCode.ERR_RefLvalueExpected, "1").WithLocation(13, 9)
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (1)
IOperation\IOperationTests_IVariableDeclaration.cs (1)
3885Diagnostic(ErrorCode.ERR_RefLvalueExpected, "1").WithLocation(7, 21)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (83)
Semantics\ArglistTests.cs (1)
231Diagnostic(ErrorCode.ERR_RefLvalueExpected, "123").WithLocation(9, 40),
Semantics\DelegateTypeTests.cs (2)
7578Diagnostic(ErrorCode.ERR_RefLvalueExpected, "() => { }").WithLocation(6, 22), 7584Diagnostic(ErrorCode.ERR_RefLvalueExpected, "delegate () { }").WithLocation(7, 22));
Semantics\ImplicitObjectCreationTests.cs (2)
2750Diagnostic(ErrorCode.ERR_RefLvalueExpected, "new()").WithLocation(6, 46) 2791Diagnostic(ErrorCode.ERR_RefLvalueExpected, "new()").WithLocation(7, 15)
Semantics\IndexAndRangeTests.cs (3)
654Diagnostic(ErrorCode.ERR_RefLvalueExpected, "arr[0..2]").WithLocation(32, 27), 771Diagnostic(ErrorCode.ERR_RefLvalueExpected, "^0").WithLocation(5, 27), 796Diagnostic(ErrorCode.ERR_RefLvalueExpected, "^0").WithLocation(4, 25));
Semantics\InterpolationTests.cs (3)
6514Diagnostic(ErrorCode.ERR_RefLvalueExpected, expression).WithLocation(3, 7) 10369Diagnostic(ErrorCode.ERR_RefLvalueExpected, "new StructLogger(true, 1)").WithLocation(7, 9) 10719Diagnostic(ErrorCode.ERR_RefLvalueExpected, "new ClassLogger(true, 1)").WithLocation(7, 9)
Semantics\MethodTypeInferenceTests.cs (1)
1019Diagnostic(ErrorCode.ERR_RefLvalueExpected, "Main()")
Semantics\NullableReferenceTypesTests.cs (2)
33619Diagnostic(ErrorCode.ERR_RefLvalueExpected, "null").WithLocation(8, 15), 33622Diagnostic(ErrorCode.ERR_RefLvalueExpected, @"""""").WithLocation(9, 15),
Semantics\OverloadResolutionTests.cs (4)
10397Diagnostic(ErrorCode.ERR_RefLvalueExpected, "2").WithLocation(20, 26), 10494Diagnostic(ErrorCode.ERR_RefLvalueExpected, "2").WithLocation(30, 25), 11102Diagnostic(ErrorCode.ERR_RefLvalueExpected, "1").WithLocation(14, 10) 11111Diagnostic(ErrorCode.ERR_RefLvalueExpected, "1").WithLocation(14, 10)
Semantics\PrimaryConstructorTests.cs (1)
14603Diagnostic(ErrorCode.ERR_RefLvalueExpected, "x").WithLocation(4, 45)
Semantics\RawInterpolationTests_Handler.cs (1)
4792Diagnostic(ErrorCode.ERR_RefLvalueExpected, expression).WithLocation(3, 7));
Semantics\RefEscapingTests.cs (6)
4150Diagnostic(ErrorCode.ERR_RefLvalueExpected, "(global, global) = global").WithLocation(8, 9) 4178Diagnostic(ErrorCode.ERR_RefLvalueExpected, "(global, global) = global").WithLocation(8, 9) 5131Diagnostic(ErrorCode.ERR_RefLvalueExpected, "this").WithLocation(6, 20), 5134Diagnostic(ErrorCode.ERR_RefLvalueExpected, "this").WithLocation(7, 19), 5188Diagnostic(ErrorCode.ERR_RefLvalueExpected, "this").WithLocation(7, 19), 5244Diagnostic(ErrorCode.ERR_RefLvalueExpected, "this").WithLocation(7, 19),
Semantics\RefExtensionMethodsTests.cs (1)
42Diagnostic(ErrorCode.ERR_RefLvalueExpected, "5").WithLocation(13, 9));
Semantics\RefFieldTests.cs (3)
674Diagnostic(ErrorCode.ERR_RefLvalueExpected, "default").WithLocation(6, 25), 20253Diagnostic(ErrorCode.ERR_RefLvalueExpected, "Value()").WithLocation(8, 39) 27922Diagnostic(ErrorCode.ERR_RefLvalueExpected, "1").WithLocation(4, 19),
Semantics\RefLocalsAndReturnsTests.cs (17)
382Diagnostic(ErrorCode.ERR_RefLvalueExpected, "rro = ref _ro").WithLocation(12, 20), 385Diagnostic(ErrorCode.ERR_RefLvalueExpected, "rro = ref rrw").WithLocation(13, 20), 388Diagnostic(ErrorCode.ERR_RefLvalueExpected, "rro = ref _rw").WithLocation(16, 28), 391Diagnostic(ErrorCode.ERR_RefLvalueExpected, @"true 500Diagnostic(ErrorCode.ERR_RefLvalueExpected, "new int[0]").WithLocation(7, 31), 503Diagnostic(ErrorCode.ERR_RefLvalueExpected, "new int[0]").WithLocation(10, 40), 530Diagnostic(ErrorCode.ERR_RefLvalueExpected, "(string)o").WithLocation(11, 18), 632Diagnostic(ErrorCode.ERR_RefLvalueExpected, "s2").WithLocation(8, 17)); 985Diagnostic(ErrorCode.ERR_RefLvalueExpected, "rrx").WithLocation(9, 18)); 1455Diagnostic(ErrorCode.ERR_RefLvalueExpected, "xr").WithLocation(14, 26), 1458Diagnostic(ErrorCode.ERR_RefLvalueExpected, "xr").WithLocation(15, 19)); 1486Diagnostic(ErrorCode.ERR_RefLvalueExpected, "42").WithLocation(8, 15), 1492Diagnostic(ErrorCode.ERR_RefLvalueExpected, "xr").WithLocation(12, 15), 1526Diagnostic(ErrorCode.ERR_RefLvalueExpected, "x").WithLocation(10, 21), 1529Diagnostic(ErrorCode.ERR_RefLvalueExpected, "x").WithLocation(11, 25) 3300Diagnostic(ErrorCode.ERR_RefLvalueExpected, "L()").WithLocation(11, 26) 3322Diagnostic(ErrorCode.ERR_RefLvalueExpected, "d()").WithLocation(8, 26)
Semantics\SemanticAnalyzerTests.cs (4)
807Diagnostic(ErrorCode.ERR_RefLvalueExpected, "123").WithLocation(27, 24), 810Diagnostic(ErrorCode.ERR_RefLvalueExpected, "x").WithLocation(28, 24), 813Diagnostic(ErrorCode.ERR_RefLvalueExpected, "y + y").WithLocation(33, 24), 816Diagnostic(ErrorCode.ERR_RefLvalueExpected, "null").WithLocation(35, 24),
Semantics\SemanticErrorTests.cs (23)
14030new ErrorDescription { Code = (int)ErrorCode.ERR_RefLvalueExpected, Line = 5, Column = 15 }); 14050Diagnostic(ErrorCode.ERR_RefLvalueExpected, "x => x = 1").WithLocation(5, 44), 14053Diagnostic(ErrorCode.ERR_RefLvalueExpected, "(x,y) => x = 1").WithLocation(6, 49), 14056Diagnostic(ErrorCode.ERR_RefLvalueExpected, "delegate (int x) {x = 1;}").WithLocation(7, 44)); 14076Diagnostic(ErrorCode.ERR_RefLvalueExpected, "x => x = 1").WithLocation(5, 44), 14079Diagnostic(ErrorCode.ERR_RefLvalueExpected, "(x,y) => x = 1").WithLocation(6, 49), 14082Diagnostic(ErrorCode.ERR_RefLvalueExpected, "delegate (int x) {x = 1;}").WithLocation(7, 44)); 14104Diagnostic(ErrorCode.ERR_RefLvalueExpected, "x => x = 1").WithLocation(7, 22), 14107Diagnostic(ErrorCode.ERR_RefLvalueExpected, "(x,y) => x = 1").WithLocation(8, 27), 14110Diagnostic(ErrorCode.ERR_RefLvalueExpected, "delegate (int x) {x = 1;}").WithLocation(9, 22)); 14132Diagnostic(ErrorCode.ERR_RefLvalueExpected, "x => x = 1").WithLocation(7, 22), 14135Diagnostic(ErrorCode.ERR_RefLvalueExpected, "(x,y) => x = 1").WithLocation(8, 27), 14138Diagnostic(ErrorCode.ERR_RefLvalueExpected, "delegate (int x) {x = 1;}").WithLocation(9, 22)); 22870Diagnostic(ErrorCode.ERR_RefLvalueExpected, "x => x").WithLocation(16, 47), 22873Diagnostic(ErrorCode.ERR_RefLvalueExpected, "Goo<string>(x => x)").WithLocation(17, 47), 22879Diagnostic(ErrorCode.ERR_RefLvalueExpected, "new Func<string, string>(x => x)").WithLocation(19, 47), 22885Diagnostic(ErrorCode.ERR_RefLvalueExpected, "Program.Goo<string>(x => x)").WithLocation(21, 47), 22888Diagnostic(ErrorCode.ERR_RefLvalueExpected, "new(x => x)").WithLocation(23, 48) 22903Diagnostic(ErrorCode.ERR_RefLvalueExpected, "x => x").WithLocation(16, 47), 22906Diagnostic(ErrorCode.ERR_RefLvalueExpected, "Goo<string>(x => x)").WithLocation(17, 47), 22912Diagnostic(ErrorCode.ERR_RefLvalueExpected, "new Func<string, string>(x => x)").WithLocation(19, 47), 22918Diagnostic(ErrorCode.ERR_RefLvalueExpected, "Program.Goo<string>(x => x)").WithLocation(21, 47), 22924Diagnostic(ErrorCode.ERR_RefLvalueExpected, "new(x => x)").WithLocation(23, 48)
Semantics\StackAllocInitializerTests.cs (6)
1638Diagnostic(ErrorCode.ERR_RefLvalueExpected, "stackalloc int [3] { 1, 2, 3 }").WithLocation(7, 28), 1644Diagnostic(ErrorCode.ERR_RefLvalueExpected, "stackalloc int [ ] { 1, 2, 3 }").WithLocation(8, 28), 1650Diagnostic(ErrorCode.ERR_RefLvalueExpected, "stackalloc [ ] { 1, 2, 3 }").WithLocation(9, 28) 1672Diagnostic(ErrorCode.ERR_RefLvalueExpected, "stackalloc int [3] { 1, 2, 3 }").WithLocation(7, 32), 1675Diagnostic(ErrorCode.ERR_RefLvalueExpected, "stackalloc int [ ] { 1, 2, 3 }").WithLocation(8, 32), 1678Diagnostic(ErrorCode.ERR_RefLvalueExpected, "stackalloc [ ] { 1, 2, 3 }").WithLocation(9, 32)
Semantics\StackAllocSpanExpressionsTests.cs (2)
496Diagnostic(ErrorCode.ERR_RefLvalueExpected, "stackalloc int[1]").WithLocation(7, 27)); 520Diagnostic(ErrorCode.ERR_RefLvalueExpected, "stackalloc int[1]").WithLocation(7, 31)
Semantics\TargetTypedDefaultTests.cs (1)
1211Diagnostic(ErrorCode.ERR_RefLvalueExpected, "default").WithLocation(18, 46)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\FunctionPointerTypeSymbolTests.cs (1)
1220Diagnostic(ErrorCode.ERR_RefLvalueExpected, "p3()").WithLocation(14, 30),
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (2)
Parsing\AnonymousFunctionParsingTests.cs (2)
957Diagnostic(ErrorCode.ERR_RefLvalueExpected, "static x => x").WithLocation(1, 29)); 967Diagnostic(ErrorCode.ERR_RefLvalueExpected, "static x => x").WithLocation(1, 29));