To reproduce:
var code =
"""
using Rocks;
using System;
#nullable enable
public class Criterion<T> : IEquatable<T>
{
public override int GetHashCode() => base.GetHashCode();
public override bool Equals(object? obj) => base.Equals(obj);
public bool Equals(T? other) => true;
}
public static class Test
{
public static void Generate()
{
var rock = Rock.Create<Criterion<object>>();
}
}
""";
Errors:
error CS0462: The inherited members 'Criterion<T>.Equals(object?)' and 'Criterion<T>.Equals(T?)' have the same signature in type 'CreateExpectationsOfCriterionOfobjectExtensions.RockCriterionOfobject', so they cannot be overridden
This was found in AutoFixture.Kernel.Criterion<>
To reproduce:
Errors:
This was found in
AutoFixture.Kernel.Criterion<>