44 references to ERR_CantChangeTypeOnOverride
Microsoft.CodeAnalysis.CSharp (3)
Errors\ErrorFacts.cs (1)
1359
or ErrorCode.
ERR_CantChangeTypeOnOverride
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (2)
967
diagnostics.Add(ErrorCode.
ERR_CantChangeTypeOnOverride
, overridingMemberLocation, overridingMember, overriddenMember, overriddenMemberType.Type);
1089
diagnostics.Add(ErrorCode.
ERR_CantChangeTypeOnOverride
, overridingMemberLocation, overridingMember, overriddenMember, overriddenMemberType.Type);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
Semantics\RecordTests.cs (3)
6685
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "B").WithArguments("B.EqualityContract", "A.EqualityContract", "int").WithLocation(2, 15)
19611
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "B").WithArguments("B.EqualityContract", "A.EqualityContract", "int").WithLocation(8, 8),
19614
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "EqualityContract").WithArguments("C.EqualityContract", "A.EqualityContract", "int").WithLocation(14, 36)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (18)
Semantics\AmbiguousOverrideTests.cs (3)
705
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "P").WithArguments("Derived.P", "Base.P", "char"));
845
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "this").WithArguments("Derived.this[int]", "Base.this[int]", "char"));
1012
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "E").WithArguments("Derived.E", "Base.E", "System.Action<char[]>"));
Semantics\InheritanceBindingTests.cs (15)
629
new ErrorDescription { Code = (int)ErrorCode.
ERR_CantChangeTypeOnOverride
, Line = 22, Column = 28 }, //1
678
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "this").WithArguments("Derived.this[long, long, long, char]", "Base.this[long, long, long, char]", "int"),
722
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "Event1").WithArguments("Derived.Event1", "Base.Event1", "System.Action"),
1896
new ErrorDescription { Code = (int)ErrorCode.
ERR_CantChangeTypeOnOverride
, Line = 16, Column = 28 }, //3
1897
new ErrorDescription { Code = (int)ErrorCode.
ERR_CantChangeTypeOnOverride
, Line = 17, Column = 25 }, //4
1955
new ErrorDescription { Code = (int)ErrorCode.
ERR_CantChangeTypeOnOverride
, Line = 16, Column = 28 }, //3
1956
new ErrorDescription { Code = (int)ErrorCode.
ERR_CantChangeTypeOnOverride
, Line = 17, Column = 25 }, //4
2275
new ErrorDescription { Code = (int)ErrorCode.
ERR_CantChangeTypeOnOverride
, Line = 16, Column = 49 }, //3
2276
new ErrorDescription { Code = (int)ErrorCode.
ERR_CantChangeTypeOnOverride
, Line = 17, Column = 46 }, //4
2419
new ErrorDescription { Code = (int)ErrorCode.
ERR_CantChangeTypeOnOverride
, Line = 11, Column = 28 }, //2
2441
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "this").WithArguments("Derived.this[string]", "Base<string>.this[string]", "string"));
2482
new ErrorDescription { Code = (int)ErrorCode.
ERR_CantChangeTypeOnOverride
, Line = 11, Column = 49 }, //2
2625
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "Property3").WithArguments("Derived.Property3", "Base.Property3", "object").WithLocation(23, 25),
2723
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "this").WithArguments("Derived.this[int, int, string, int]", "Base.this[int, int, string, int]", "object").WithLocation(23, 25),
2798
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "Event3").WithArguments("Derived.Event3", "Base.Event3", "System.Action"),
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (20)
Symbols\CovariantReturnTests.cs (16)
1341
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "E").WithArguments("Derived.E", "Base.E", "System.Func<object>").WithLocation(10, 40)
1347
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "E").WithArguments("Derived.E", "Base.E", "System.Func<object>").WithLocation(10, 40)
1385
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "P").WithArguments("Derived.P", "Base.P", "System.Func<object>").WithLocation(9, 34)
1391
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "P").WithArguments("Derived.P", "Base.P", "System.Func<object>").WithLocation(9, 34)
1831
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "M2").WithArguments("Derived2.M2", "Derived.M2", "string").WithLocation(17, 28),
1834
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "M3").WithArguments("Derived2.M3", "Derived.M3", "string").WithLocation(18, 26)
1840
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "M2").WithArguments("Derived2.M2", "Derived.M2", "string").WithLocation(17, 28),
1843
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "M3").WithArguments("Derived2.M3", "Derived.M3", "string").WithLocation(18, 26)
1978
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "M1").WithArguments("Derived.M1", "Base.M1", "IIn<object>").WithLocation(9, 33),
1981
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "M2").WithArguments("Derived.M2", "Base.M2", "IOut<string>").WithLocation(10, 34)
1987
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "M1").WithArguments("Derived.M1", "Base.M1", "IIn<object>").WithLocation(9, 33),
1990
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "M2").WithArguments("Derived.M2", "Base.M2", "IOut<string>").WithLocation(10, 34)
2039
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "M1").WithArguments("Derived.M1", "Base.M1", "int").WithLocation(9, 27),
2042
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "M2").WithArguments("Derived.M2", "Base.M2", "A").WithLocation(10, 23)
2048
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "M1").WithArguments("Derived.M1", "Base.M1", "int").WithLocation(9, 27),
2051
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "M2").WithArguments("Derived.M2", "Base.M2", "A").WithLocation(10, 23)
Symbols\OverriddenOrHiddenMembersTests.cs (3)
2460
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "X").WithArguments("D.X", "C.X", "string"),
2519
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "E").WithArguments("D.E", "C.E", "System.Func<int>").WithLocation(19, 41),
2643
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "this").WithArguments("D.this[int]", "C.this[int]", "string"),
Symbols\SymbolErrorTests.cs (1)
15947
Diagnostic(ErrorCode.
ERR_CantChangeTypeOnOverride
, "myProperty").WithArguments("Derived.myProperty", "Base.myProperty", "int").WithLocation(13, 28)