61 references to ERR_AssgLvalueExpected
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder.ValueChecks.cs (1)
2775return ErrorCode.ERR_AssgLvalueExpected;
Errors\ErrorFacts.cs (1)
662case 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)
11368Diagnostic(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)
57Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "x")); 129Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "x"),
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)
1069Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "x?.P1").WithLocation(6, 9) 1170Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "x?.P1").WithLocation(6, 9)
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)
993Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "c.MyEvent += handler").WithLocation(11, 10) 1105Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "c.MyEvent += handler").WithLocation(11, 10)
IOperation\IOperationTests_IForEachLoopStatement.cs (1)
4450Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "a ?? b").WithLocation(6, 42),
IOperation\IOperationTests_IObjectCreationExpression.cs (2)
9068Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "P1 ?? P2").WithLocation(11, 38), 9208Diagnostic(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) 1973Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "b ? (var i1, var i2) : (var i3, var i4)").WithLocation(6, 10)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (34)
Semantics\ConditionalOperatorTests.cs (1)
1416Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "receiver?.test").WithLocation(10, 9)
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\RefFieldTests.cs (8)
5434Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "new S1<T>().F").WithLocation(27, 9), 5437Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "new S2<T>().F").WithLocation(28, 9), 5440Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "new S3<T>().F").WithLocation(29, 9), 5443Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "new S4<T>().F").WithLocation(30, 9)); 8072Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "new S<T>().F").WithLocation(11, 16), 8075Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "new S<T>(1).F").WithLocation(15, 16)); 9923Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "rL").WithLocation(14, 9)); 9933Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "rL").WithLocation(14, 9));
Semantics\RefLocalsAndReturnsTests.cs (1)
1404Diagnostic(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)
3727Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "++P"), 3729Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "++i"), 3731Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "++this[0]")); 3756Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "i").WithLocation(7, 9), 3759Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "3").WithLocation(8, 9), 3762Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "i + 1").WithLocation(9, 10), 3765Diagnostic(ErrorCode.ERR_AssgLvalueExpected, @"""string""").WithLocation(10, 9), 3768Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "null").WithLocation(11, 9), 3771Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "NoObject").WithLocation(12, 9)); 3807Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "default(S).P").WithLocation(16, 9), 3809Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "default(T).P").WithLocation(17, 9), 3811Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "default(S)[0]").WithLocation(18, 9), 3813Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "default(T)[0]").WithLocation(19, 9)); 22490Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "default(T3)[1]").WithLocation(37, 9), // Incorrect? See CS0131ERR_AssgLvalueExpected03 unit test. 22496Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "default(T3)[1]").WithLocation(37, 9));
Semantics\StructsTests.cs (2)
571Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "new TestStruct().IntI") 598Diagnostic(ErrorCode.ERR_AssgLvalueExpected, "new S().P")
Semantics\Utf8StringsLiteralsTests.cs (1)
4178Diagnostic(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));