15 references to ERR_CantChangeInitOnlyOnOverride
Microsoft.CodeAnalysis.CSharp (2)
Errors\ErrorFacts.cs (1)
2052
case ErrorCode.
ERR_CantChangeInitOnlyOnOverride
:
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (1)
1127
diagnostics.Add(ErrorCode.
ERR_CantChangeInitOnlyOnOverride
, overridingMemberLocation, overridingProperty, overriddenProperty);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (13)
Semantics\InitOnlyMemberTests.cs (12)
1763
Diagnostic(ErrorCode.
ERR_CantChangeInitOnlyOnOverride
, "Property").WithArguments("DerivedWithoutInit.Property", "Base.Property").WithLocation(13, 28),
1766
Diagnostic(ErrorCode.
ERR_CantChangeInitOnlyOnOverride
, "Property").WithArguments("DerivedWithoutInitSetterOnly.Property", "Base.Property").WithLocation(22, 28),
1769
Diagnostic(ErrorCode.
ERR_CantChangeInitOnlyOnOverride
, "Property").WithArguments("DerivedDerivedWithoutInit.Property", "DerivedGetterOnly.Property").WithLocation(35, 28)
1813
Diagnostic(ErrorCode.
ERR_CantChangeInitOnlyOnOverride
, "Property").WithArguments("DerivedWithoutInit.Property", "Base.Property").WithLocation(8, 28),
1816
Diagnostic(ErrorCode.
ERR_CantChangeInitOnlyOnOverride
, "Property").WithArguments("DerivedWithoutInitSetterOnly.Property", "Base.Property").WithLocation(16, 28)
1865
Diagnostic(ErrorCode.
ERR_CantChangeInitOnlyOnOverride
, "Property").WithArguments("DerivedWithInit.Property", "Base.Property").WithLocation(9, 28),
1868
Diagnostic(ErrorCode.
ERR_CantChangeInitOnlyOnOverride
, "Property").WithArguments("DerivedWithInitSetterOnly.Property", "Base.Property").WithLocation(18, 28),
1871
Diagnostic(ErrorCode.
ERR_CantChangeInitOnlyOnOverride
, "Property").WithArguments("DerivedDerivedWithInit.Property", "DerivedGetterOnly.Property").WithLocation(31, 28)
1948
Diagnostic(ErrorCode.
ERR_CantChangeInitOnlyOnOverride
, "Property").WithArguments("DerivedWithInit.Property", "Base.Property").WithLocation(8, 28),
1957
Diagnostic(ErrorCode.
ERR_CantChangeInitOnlyOnOverride
, "Property").WithArguments("DerivedWithInitSetterOnly.Property", "Base.Property").WithLocation(16, 28),
3259
Diagnostic(ErrorCode.
ERR_CantChangeInitOnlyOnOverride
, "Property").WithArguments("Derived2.Property", "C.Property").WithLocation(8, 25),
3564
Diagnostic(ErrorCode.
ERR_CantChangeInitOnlyOnOverride
, "this").WithArguments("Derived2.this[int]", "C.this[int]").WithLocation(8, 25),
Semantics\RecordTests.cs (1)
11239
Diagnostic(ErrorCode.
ERR_CantChangeInitOnlyOnOverride
, "P2").WithArguments("B.P2", "A.P2").WithLocation(10, 28),