102 references to ERR_AssgLvalueExpected
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder.ValueChecks.cs (1)
3287return ErrorCode.ERR_AssgLvalueExpected;
Errors\ErrorFacts.cs (1)
723or ErrorCode.ERR_AssgLvalueExpected
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (9)
CodeGen\CodeGenDeconstructTests.cs (1)
7343Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "args is var x2").WithLocation(6, 34),
CodeGen\CodeGenFunctionPointersTests.cs (1)
11415Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "ptr(i)").WithLocation(6, 5)
CodeGen\CodeGenNullCoalescingAssignmentTests.cs (5)
681Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "GetInt()").WithLocation(12, 9), 687Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "() => {}").WithLocation(14, 9) 1696Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "o ??= null").WithLocation(10, 10) 2344Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "await t1").WithLocation(7, 9) 2661Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "(x, y)").WithLocation(7, 9)
Emit\CompilationEmitTests.cs (2)
58Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "x")); 130Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "x"),
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (7)
CodeGen\IndexAndRangeTests.cs (7)
2162Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "b[..]").WithLocation(2, 1), 2165Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "[..]").WithLocation(4, 22), 2168Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "[..]").WithLocation(5, 21) 4094Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "[..]").WithLocation(4, 22), 4100Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "[0]").WithLocation(4, 26) 4127Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "[0]").WithLocation(4, 26) 4149Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "[0]").WithLocation(1, 25)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (18)
Semantics\CollectionExpressionTests.cs (1)
28017Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "[]").WithLocation(7, 9));
Semantics\ExtensionOperatorsTests.cs (4)
24137Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "new()").WithLocation(29, 13), 24140Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "new()").WithLocation(30, 13), 24146Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "default").WithLocation(32, 13), 24149Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "default").WithLocation(33, 13)
Semantics\ExtensionTests.cs (8)
20451Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "Enum.Zero.Property").WithLocation(1, 1)); 20625Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "1.Property").WithLocation(1, 1)); 20751Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "(1, 2).Property").WithLocation(1, 1)); 24051Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "Property").WithLocation(1, 41), 24054Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "new System.ReadOnlySpan<string>().Property").WithLocation(3, 1)); 24069Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "new S().Property").WithLocation(1, 1)); 24094Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "Property").WithLocation(1, 44)); 24119Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "Property").WithLocation(1, 34));
Semantics\InlineArrayTests.cs (5)
7157Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "x.F[..5]").WithLocation(12, 9) 10497Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "c.F[..5]").WithLocation(18, 9) 16148Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "(System.Span<int>)x.F").WithLocation(12, 10), 16151Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "(System.ReadOnlySpan<int>)x.F").WithLocation(13, 10) 23501Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "[2]").WithLocation(8, 12));
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (14)
IOperation\IOperationTests_IAnonymousObjectCreationOperation.cs (1)
1159Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "M2()").WithLocation(8, 19)
IOperation\IOperationTests_ICoalesceAssignmentOperation.cs (1)
723Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "o1 ?? o2").WithLocation(6, 10)
IOperation\IOperationTests_IConditionalAccessExpression.cs (2)
1039Diagnostic(ErrorCode.ERR_AssgLvalueExpected, ".P1").WithLocation(6, 11) 1109Diagnostic(ErrorCode.ERR_AssgLvalueExpected, ".P1").WithLocation(6, 11)
IOperation\IOperationTests_IDeconstructionAssignmentOperation.cs (1)
649Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "c1?.fI1").WithLocation(7, 10),
IOperation\IOperationTests_IDiscardOperation.cs (1)
212Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "b ? i1 : i2").WithLocation(6, 14) };
IOperation\IOperationTests_IEventAssignmentExpression.cs (2)
996Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "c.MyEvent += handler").WithLocation(11, 10) 1102Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "c.MyEvent += handler").WithLocation(11, 10)
IOperation\IOperationTests_IForEachLoopStatement.cs (1)
4446Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "a ?? b").WithLocation(6, 42),
IOperation\IOperationTests_IObjectCreationExpression.cs (2)
9055Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "P1 ?? P2").WithLocation(11, 38), 9199Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "P1 ?? P2").WithLocation(11, 38),
IOperation\IOperationTests_ITupleExpression.cs (3)
1617Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "b ? i2 : i3").WithLocation(6, 14) 1865Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "b ? (i1, i2) : (i3, i4)").WithLocation(6, 10) 1977Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "b ? (var i1, var i2) : (var i3, var i4)").WithLocation(6, 10)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (50)
Semantics\DeconstructionTests.cs (1)
1245Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "1").WithLocation(6, 20),
Semantics\ImplicitObjectCreationTests.cs (3)
1320Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "new()").WithLocation(6, 9), 1323Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "new()").WithLocation(7, 9) 1738Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "new()").WithLocation(6, 9)
Semantics\InterpolationTests.cs (1)
19187Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "a switch { 1 => null }").WithLocation(8, 1),
Semantics\NullConditionalAssignmentTests.cs (14)
313Diagnostic(ErrorCode.ERR_AssgLvalueExpected, ".f").WithLocation(11, 11), 316Diagnostic(ErrorCode.ERR_AssgLvalueExpected, ".P").WithLocation(12, 11), 319Diagnostic(ErrorCode.ERR_AssgLvalueExpected, ".f").WithLocation(18, 25), 322Diagnostic(ErrorCode.ERR_AssgLvalueExpected, ".P").WithLocation(19, 25), 449Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "[1]").WithLocation(10, 11), 452Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "[3]").WithLocation(11, 29)); 515Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "c1?.F").WithLocation(9, 10), 518Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "c2?.F").WithLocation(9, 17)); 553Diagnostic(ErrorCode.ERR_AssgLvalueExpected, ".RF").WithLocation(14, 13)); 990Diagnostic(ErrorCode.ERR_AssgLvalueExpected, ".F").WithLocation(9, 14), 993Diagnostic(ErrorCode.ERR_AssgLvalueExpected, ".F").WithLocation(14, 28)); 1019Diagnostic(ErrorCode.ERR_AssgLvalueExpected, ".F").WithLocation(9, 12)); 2265Diagnostic(ErrorCode.ERR_AssgLvalueExpected, ".P").WithLocation(5, 11)); 2291Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "c?.F").WithLocation(8, 10));
Semantics\OverloadResolutionTests.cs (1)
7582Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "[1]").WithLocation(8, 28));
Semantics\RecordStructTests.cs (1)
10107Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "[0]").WithLocation(7, 26),
Semantics\RefFieldTests.cs (8)
5503Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "new S1<T>().F").WithLocation(27, 9), 5506Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "new S2<T>().F").WithLocation(28, 9), 5509Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "new S3<T>().F").WithLocation(29, 9), 5512Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "new S4<T>().F").WithLocation(30, 9)); 8574Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "new S<T>().F").WithLocation(11, 16), 8577Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "new S<T>(1).F").WithLocation(15, 16)); 10435Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "rL").WithLocation(14, 9)); 10445Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "rL").WithLocation(14, 9));
Semantics\RefLocalsAndReturnsTests.cs (1)
1505Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "rs.X").WithLocation(21, 9));
Semantics\SemanticAnalyzerTests.cs (2)
690Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "null").WithLocation(12, 9), 696Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "x").WithLocation(14, 9),
Semantics\SemanticErrorTests.cs (15)
3725Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "++P"), 3727Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "++i"), 3729Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "++this[0]")); 3754Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "i").WithLocation(7, 9), 3757Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "3").WithLocation(8, 9), 3760Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "i + 1").WithLocation(9, 10), 3763Diagnostic(ErrorCode.ERR_AssgLvalueExpected, @"""string""").WithLocation(10, 9), 3766Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "null").WithLocation(11, 9), 3769Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "NoObject").WithLocation(12, 9)); 3805Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "default(S).P").WithLocation(16, 9), 3807Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "default(T).P").WithLocation(17, 9), 3809Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "default(S)[0]").WithLocation(18, 9), 3811Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "default(T)[0]").WithLocation(19, 9)); 22714Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "default(T3)[1]").WithLocation(37, 9), // Incorrect? See CS0131ERR_AssgLvalueExpected03 unit test. 22720Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "default(T3)[1]").WithLocation(37, 9));
Semantics\StructsTests.cs (2)
572Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "new TestStruct().IntI") 599Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "new S().P")
Semantics\Utf8StringsLiteralsTests.cs (1)
4196Diagnostic(ErrorCode.ERR_AssgLvalueExpected, @"""c""u8").WithLocation(12, 9),
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\Source\ExpressionBodiedPropertyTests.cs (1)
120Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "1").WithLocation(4, 21));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Parsing\ParserErrorMessageTests.cs (1)
1285Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "s.ToString()").WithLocation(7, 23));