22 references to ERR_CantChangeRefReturnOnOverride
Microsoft.CodeAnalysis.CSharp (3)
Errors\ErrorFacts.cs (1)
1772
or ErrorCode.
ERR_CantChangeRefReturnOnOverride
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (2)
994
diagnostics.Add(ErrorCode.
ERR_CantChangeRefReturnOnOverride
, overridingMemberLocation, overridingMember, overriddenMember);
1060
diagnostics.Add(ErrorCode.
ERR_CantChangeRefReturnOnOverride
, overridingMemberLocation, overridingProperty, overriddenProperty);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
Emit\InAttributeModifierTests.cs (1)
3860
Diagnostic(ErrorCode.
ERR_CantChangeRefReturnOnOverride
, "M").WithArguments("Test.M()", "ParentTest.M()").WithLocation(8, 25));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (12)
Semantics\InheritanceBindingTests.cs (12)
1781
Diagnostic(ErrorCode.
ERR_CantChangeRefReturnOnOverride
, "Method1").WithArguments("Derived.Method1()", "Base.Method1()").WithLocation(13, 29),
1784
Diagnostic(ErrorCode.
ERR_CantChangeRefReturnOnOverride
, "Method2").WithArguments("Derived.Method2(ref int)", "Base.Method2(ref int)").WithLocation(14, 25));
1926
Diagnostic(ErrorCode.
ERR_CantChangeRefReturnOnOverride
, "Proprty1").WithArguments("Derived.Proprty1", "Base.Proprty1").WithLocation(15, 29),
1929
Diagnostic(ErrorCode.
ERR_CantChangeRefReturnOnOverride
, "Property2").WithArguments("Derived.Property2", "Base.Property2").WithLocation(16, 25));
1985
Diagnostic(ErrorCode.
ERR_CantChangeRefReturnOnOverride
, "this").WithArguments("Derived.this[int, int]", "Base.this[int, int]").WithLocation(15, 29),
1988
Diagnostic(ErrorCode.
ERR_CantChangeRefReturnOnOverride
, "this").WithArguments("Derived.this[int, string]", "Base.this[int, string]").WithLocation(16, 25));
2560
Diagnostic(ErrorCode.
ERR_CantChangeRefReturnOnOverride
, "Method5").WithArguments("Derived.Method5(ref object)", "Base.Method5(ref object)").WithLocation(18, 28),
2563
Diagnostic(ErrorCode.
ERR_CantChangeRefReturnOnOverride
, "Method6").WithArguments("Derived.Method6(ref object)", "Base.Method6(ref object)").WithLocation(19, 32),
2640
Diagnostic(ErrorCode.
ERR_CantChangeRefReturnOnOverride
, "Property10").WithArguments("Derived.Property10", "Base.Property10").WithLocation(35, 32),
2643
Diagnostic(ErrorCode.
ERR_CantChangeRefReturnOnOverride
, "Property11").WithArguments("Derived.Property11", "Base.Property11").WithLocation(36, 28),
2738
Diagnostic(ErrorCode.
ERR_CantChangeRefReturnOnOverride
, "this").WithArguments("Derived.this[string, int, int, string]", "Base.this[string, int, int, string]").WithLocation(35, 32),
2741
Diagnostic(ErrorCode.
ERR_CantChangeRefReturnOnOverride
, "this").WithArguments("Derived.this[string, int, string, int]", "Base.this[string, int, string, int]").WithLocation(36, 28),
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (6)
Symbols\OverriddenOrHiddenMembersTests.cs (6)
4450
Diagnostic(ErrorCode.
ERR_CantChangeRefReturnOnOverride
, "Method2").WithArguments("ChildClass.Method2()", "BaseClass.Method2()").WithLocation(11, 29),
4453
Diagnostic(ErrorCode.
ERR_CantChangeRefReturnOnOverride
, "Method1").WithArguments("ChildClass.Method1()", "BaseClass.Method1()").WithLocation(10, 38));
4476
Diagnostic(ErrorCode.
ERR_CantChangeRefReturnOnOverride
, "Property2").WithArguments("B.Property2", "A.Property2").WithLocation(11, 29),
4479
Diagnostic(ErrorCode.
ERR_CantChangeRefReturnOnOverride
, "Property1").WithArguments("B.Property1", "A.Property1").WithLocation(10, 38));
4500
Diagnostic(ErrorCode.
ERR_CantChangeRefReturnOnOverride
, "this").WithArguments("B.this[int]", "A.this[int]").WithLocation(9, 38));
4521
Diagnostic(ErrorCode.
ERR_CantChangeRefReturnOnOverride
, "this").WithArguments("B.this[int]", "A.this[int]").WithLocation(9, 29));