27 references to ERR_DoesNotOverrideMethodFromObject
Microsoft.CodeAnalysis.CSharp (2)
Errors\ErrorFacts.cs (1)
2125
or ErrorCode.
ERR_DoesNotOverrideMethodFromObject
Symbols\Synthesized\Records\SynthesizedRecordObjectMethod.cs (1)
54
diagnostics.Add(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, overriding.GetFirstLocation(), overriding);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (23)
Semantics\RecordTests.cs (23)
4450
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "C").WithArguments("C.Equals(object?)").WithLocation(2, 8),
4453
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "C").WithArguments("C.GetHashCode()").WithLocation(2, 8),
4456
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "C").WithArguments("C.ToString()").WithLocation(2, 8),
4516
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "D").WithArguments("D.Equals(object?)").WithLocation(2, 8),
4519
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "D").WithArguments("D.GetHashCode()").WithLocation(2, 8),
4522
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "D").WithArguments("D.ToString()").WithLocation(2, 8),
4541
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "D").WithArguments("D.Equals(object?)").WithLocation(2, 8),
4544
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "D").WithArguments("D.GetHashCode()").WithLocation(2, 8),
4547
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "D").WithArguments("D.ToString()").WithLocation(2, 8),
7224
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "B").WithArguments("B.ToString()").WithLocation(2, 15)
16149
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "B").WithArguments("B.Equals(object?)").WithLocation(2, 15)
16581
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "B").WithArguments("B.GetHashCode()").WithLocation(2, 15)
16588
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "GetHashCode").WithArguments("B.GetHashCode()").WithLocation(3, 25)
16595
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "B").WithArguments("B.GetHashCode()").WithLocation(2, 15)
16602
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "B").WithArguments("B.GetHashCode()").WithLocation(2, 15)
16609
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "GetHashCode").WithArguments("B.GetHashCode()").WithLocation(3, 25)
16616
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "GetHashCode").WithArguments("B.GetHashCode()").WithLocation(3, 25)
16872
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "GetHashCode").WithArguments("A.GetHashCode()").WithLocation(3, 20)
16891
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "GetHashCode").WithArguments("A.GetHashCode()").WithLocation(3, 27),
16928
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "GetHashCode").WithArguments("A.GetHashCode()").WithLocation(3, 21)
17187
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "GetHashCode").WithArguments("B.GetHashCode()").WithLocation(3, 23)
17349
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "GetHashCode").WithArguments("A.GetHashCode()").WithLocation(3, 31),
17445
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "GetHashCode").WithArguments("A.GetHashCode()").WithLocation(3, 26),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\RecordStructTests.cs (2)
4867
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "A").WithArguments("A.GetHashCode()").WithLocation(2, 22)
5706
Diagnostic(ErrorCode.
ERR_DoesNotOverrideMethodFromObject
, "ToString").WithArguments("C1.ToString()").WithLocation(4, 23)