27 references to ERR_DoesNotOverrideMethodFromObject
Microsoft.CodeAnalysis.CSharp (2)
Errors\ErrorFacts.cs (1)
2068
case ErrorCode.
ERR_DoesNotOverrideMethodFromObject
:
Symbols\Synthesized\Records\SynthesizedRecordObjectMethod.cs (1)
60
diagnostics.Add(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, overriding.Locations[0], overriding);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (25)
Semantics\RecordStructTests.cs (2)
4765
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "A").WithArguments("A.GetHashCode()").WithLocation(2, 22)
5604
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "ToString").WithArguments("C1.ToString()").WithLocation(4, 23)
Semantics\RecordTests.cs (23)
4395
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "C").WithArguments("C.Equals(object?)").WithLocation(2, 8),
4398
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "C").WithArguments("C.GetHashCode()").WithLocation(2, 8),
4401
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "C").WithArguments("C.ToString()").WithLocation(2, 8),
4461
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "D").WithArguments("D.Equals(object?)").WithLocation(2, 8),
4464
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "D").WithArguments("D.GetHashCode()").WithLocation(2, 8),
4467
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "D").WithArguments("D.ToString()").WithLocation(2, 8),
4486
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "D").WithArguments("D.Equals(object?)").WithLocation(2, 8),
4489
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "D").WithArguments("D.GetHashCode()").WithLocation(2, 8),
4492
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "D").WithArguments("D.ToString()").WithLocation(2, 8),
7169
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "B").WithArguments("B.ToString()").WithLocation(2, 15)
16046
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "B").WithArguments("B.Equals(object?)").WithLocation(2, 15)
16478
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "B").WithArguments("B.GetHashCode()").WithLocation(2, 15)
16485
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "GetHashCode").WithArguments("B.GetHashCode()").WithLocation(3, 25)
16492
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "B").WithArguments("B.GetHashCode()").WithLocation(2, 15)
16499
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "B").WithArguments("B.GetHashCode()").WithLocation(2, 15)
16506
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "GetHashCode").WithArguments("B.GetHashCode()").WithLocation(3, 25)
16513
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "GetHashCode").WithArguments("B.GetHashCode()").WithLocation(3, 25)
16769
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "GetHashCode").WithArguments("A.GetHashCode()").WithLocation(3, 20)
16788
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "GetHashCode").WithArguments("A.GetHashCode()").WithLocation(3, 27),
16825
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "GetHashCode").WithArguments("A.GetHashCode()").WithLocation(3, 21)
17084
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "GetHashCode").WithArguments("B.GetHashCode()").WithLocation(3, 23)
17246
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "GetHashCode").WithArguments("A.GetHashCode()").WithLocation(3, 31),
17342
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "GetHashCode").WithArguments("A.GetHashCode()").WithLocation(3, 26),