64 references to ERR_AssignmentInitOnly
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder.ValueChecks.cs (1)
1532
Error(diagnostics, ErrorCode.
ERR_AssignmentInitOnly
, node, propertySymbol);
Errors\ErrorFacts.cs (1)
2051
case ErrorCode.
ERR_AssignmentInitOnly
:
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (62)
Semantics\InitOnlyMemberTests.cs (59)
117
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C.Property").WithLocation(6, 45),
189
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "c.Property").WithArguments("C.Property").WithLocation(6, 9),
496
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C.Property").WithLocation(8, 9),
505
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "c.Property").WithArguments("C.Property").WithLocation(21, 9)
548
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C.Property").WithLocation(8, 9),
554
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "c.Property").WithArguments("C.Property").WithLocation(21, 9),
557
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C.Property").WithLocation(22, 9),
606
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C<string>.Property").WithLocation(10, 9)
690
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C<string>.Property").WithLocation(12, 13),
693
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C<string>.Property").WithLocation(18, 13),
696
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C<string>.Property").WithLocation(26, 13),
699
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C<string>.Property").WithLocation(32, 13)
747
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C<T>.Property").WithLocation(10, 13),
750
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C<T>.Property").WithLocation(16, 13),
753
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C<T>.Property").WithLocation(26, 17),
756
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C<T>.Property").WithLocation(32, 17)
872
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C.Property").WithLocation(8, 9),
875
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C.Property").WithLocation(21, 13),
878
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C.Property").WithLocation(34, 13),
881
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C.Property").WithLocation(39, 13),
887
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C.Property").WithLocation(54, 9),
890
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C.Property").WithLocation(66, 13),
893
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C.Property").WithLocation(79, 13),
896
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C.Property").WithLocation(84, 13)
1214
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "c.Property").WithArguments("C.Property").WithLocation(9, 9),
1217
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "c.Property").WithArguments("C.Property").WithLocation(16, 13),
1220
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "c.Property").WithArguments("C.Property").WithLocation(24, 9),
1223
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "c.Property").WithArguments("C.Property").WithLocation(31, 13),
1226
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "c.Property").WithArguments("C.Property").WithLocation(41, 18)
1253
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C.Property").WithLocation(8, 10),
1256
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C.Property").WithLocation(8, 21),
1259
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C.Property").WithLocation(8, 31)
1310
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C.Property").WithLocation(8, 9)
1337
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C.Property").WithLocation(8, 9)
1364
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C.Property").WithLocation(8, 9)
1391
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C.Property").WithLocation(8, 9)
1619
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "c.Property").WithArguments("C.Property").WithLocation(8, 9),
1622
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "c.Property").WithArguments("C.Property").WithLocation(13, 9),
1625
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "c.Property").WithArguments("C.Property").WithLocation(20, 13),
1628
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "c.Property").WithArguments("C.Property").WithLocation(25, 13),
1631
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "c.Property").WithArguments("C.Property").WithLocation(33, 13),
1634
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "c.Property").WithArguments("C.Property").WithLocation(38, 13),
1637
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C.Property").WithLocation(51, 9),
1640
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "base.Property").WithArguments("C.Property").WithLocation(52, 9),
1643
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C.Property").WithLocation(65, 13),
1646
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "base.Property").WithArguments("C.Property").WithLocation(66, 13),
1649
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C.Property").WithLocation(80, 13),
1652
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "base.Property").WithArguments("C.Property").WithLocation(81, 13),
1655
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("C.Property").WithLocation(86, 13),
1658
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "base.Property").WithArguments("C.Property").WithLocation(87, 13)
1686
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "((ISomething)this).Property").WithArguments("ISomething.Property").WithLocation(13, 17)
1714
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "((ISomething)this).Property").WithArguments("ISomething.Property").WithLocation(13, 17)
2610
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "this[43]").WithArguments("C.this[int]").WithLocation(14, 9),
2613
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "this[45]").WithArguments("C.this[int]").WithLocation(25, 9),
2616
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "c2[47]").WithArguments("C.this[int]").WithLocation(33, 9)
4476
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "FirstName").WithArguments("Person.FirstName").WithLocation(7, 16)
4505
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "FirstName").WithArguments("Person.FirstName").WithLocation(10, 24)
4529
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "FirstName").WithArguments("Person.FirstName").WithLocation(7, 19)
4606
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "Property").WithArguments("ITest28.Property").WithLocation(9, 47)
Semantics\PrimaryConstructorTests.cs (2)
7382
diagnosticsToCheck.Where(d => d.Code is (int)ErrorCode.
ERR_AssignmentInitOnly
).Any())
7387
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "p1").WithArguments("C1.p1").WithLocation(2000, 1)
Semantics\RecordTests.cs (1)
2528
Diagnostic(ErrorCode.
ERR_AssignmentInitOnly
, "X").WithArguments("R.X").WithLocation(7, 18),