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