64 references to ERR_AssgReadonlyLocal
Microsoft.CodeAnalysis.CSharp (3)
Binder\Binder.ValueChecks.cs (2)
3215
return ErrorCode.
ERR_AssgReadonlyLocal
;
3224
return isValueType ? ErrorCode.
ERR_AssgReadonlyLocal
: ErrorCode.ERR_IncrementLvalueExpected;
Errors\ErrorFacts.cs (1)
1268
or ErrorCode.
ERR_AssgReadonlyLocal
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (3)
CodeGen\CodeGenNullCoalescingAssignmentTests.cs (1)
2451
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "this").WithArguments("this").WithLocation(6, 9),
CodeGen\CodeGenReadonlyStructTests.cs (1)
642
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "this").WithArguments("this").WithLocation(27, 13),
CodeGen\IndexAndRangeTests.cs (1)
365
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "this[^1]").WithArguments("this[^1]").WithLocation(24, 9)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (28)
Semantics\PrimaryConstructorTests.cs (8)
14690
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "x").WithArguments("x").WithLocation(6, 9)
14719
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "x").WithArguments("x").WithLocation(12, 13)
14748
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "x").WithArguments("x").WithLocation(12, 13)
15097
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "x.F").WithArguments("x.F").WithLocation(6, 9)
15131
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "x.F").WithArguments("x.F").WithLocation(12, 13)
15165
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "x.F").WithArguments("x.F").WithLocation(12, 13)
15502
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "x").WithArguments("x").WithLocation(6, 9)
15583
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "x.F").WithArguments("x.F").WithLocation(6, 9)
Symbols\UserDefinedCompoundAssignmentOperatorsTests.cs (20)
6972
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "F").WithArguments("F").WithLocation(5, 42),
6975
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "F").WithArguments("F").WithLocation(6, 50)
7000
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "this").WithArguments("this").WithLocation(4, 33),
7003
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "this").WithArguments("this").WithLocation(5, 41)
7135
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "F").WithArguments("F").WithLocation(11, 38),
7138
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "F").WithArguments("F").WithLocation(12, 46)
7169
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "this").WithArguments("this").WithLocation(10, 29),
7172
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "this").WithArguments("this").WithLocation(11, 37)
18566
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "F").WithArguments("F").WithLocation(5, 47),
18569
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "F").WithArguments("F").WithLocation(6, 55)
18597
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "F").WithArguments("F").WithLocation(7, 9)
18622
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "this").WithArguments("this").WithLocation(4, 38),
18625
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "this").WithArguments("this").WithLocation(5, 46)
18652
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "this").WithArguments("this").WithLocation(6, 9)
18811
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "F").WithArguments("F").WithLocation(11, 43),
18814
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "F").WithArguments("F").WithLocation(12, 51)
18847
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "F").WithArguments("F").WithLocation(12, 9)
18885
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "this").WithArguments("this").WithLocation(12, 9),
18888
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "this").WithArguments("this").WithLocation(17, 9)
18920
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "this").WithArguments("this").WithLocation(11, 9)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (30)
Semantics\ImplicitObjectCreationTests.cs (1)
1955
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "this").WithArguments("this").WithLocation(5, 19)
Semantics\ReadOnlyStructsTests.cs (25)
81
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "this").WithArguments("this").WithLocation(16, 9),
84
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "this.x").WithArguments("this.x").WithLocation(18, 9));
158
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "e").WithArguments("e").WithLocation(43, 9),
193
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "this").WithArguments("this").WithLocation(11, 9),
196
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "this.x").WithArguments("this.x").WithLocation(13, 9));
355
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "i").WithArguments("i").WithLocation(7, 52),
358
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "i").WithArguments("i").WithLocation(8, 52),
361
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "i").WithArguments("i").WithLocation(9, 56));
386
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "i").WithArguments("i").WithLocation(12, 9));
418
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "i").WithArguments("i").WithLocation(12, 9));
478
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "i").WithArguments("i").WithLocation(12, 9));
547
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "i").WithArguments("i").WithLocation(16, 9));
578
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "i").WithArguments("i").WithLocation(16, 9));
707
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "P2").WithArguments("P2").WithLocation(27, 9));
730
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "i").WithArguments("i").WithLocation(7, 9),
733
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "i").WithArguments("i").WithLocation(8, 9),
736
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "i").WithArguments("i").WithLocation(9, 11),
739
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "i").WithArguments("i").WithLocation(10, 11));
760
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "i").WithArguments("i").WithLocation(7, 9),
763
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "i").WithArguments("i").WithLocation(8, 9));
942
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "E").WithArguments("E").WithLocation(11, 9));
964
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "i").WithArguments("i").WithLocation(8, 15),
967
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "i").WithArguments("i").WithLocation(9, 18));
2399
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "P1").WithArguments("P1").WithLocation(20, 9),
2402
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "P2").WithArguments("P2").WithLocation(21, 9),
Semantics\RefEscapingTests.cs (1)
11491
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "Span").WithArguments("Span").WithLocation(15, 9));
Semantics\SemanticAnalyzerTests.cs (1)
726
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "this").WithArguments("this").WithLocation(36, 9)
Semantics\SemanticErrorTests.cs (1)
14963
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "this").WithArguments("this"));
Semantics\TargetTypedDefaultTests.cs (1)
171
Diagnostic(ErrorCode.
ERR_AssgReadonlyLocal
, "this").WithArguments("this").WithLocation(5, 19)