To reproduce:
"""
using Rocks;
#nullable enable
namespace MockTests
{
public class Credentials { }
public class NewCredentials : Credentials { }
public class BaseCopy
{
public virtual Credentials Copy() => default;
}
public class NewCopy : BaseCopy
{
public new NewCredentials Copy() => default;
}
public static class Test
{
public static void Generate()
{
var rock = Rock.Create<NewCopy>();
}
}
}
""";
This gives the following error:
error CS0506: 'CreateExpectationsOfNewCopyExtensions.RockNewCopy.Copy()': cannot override inherited member 'NewCopy.Copy()' because it is not marked virtual, abstract, or override
I don't know if the inheritance relationship with the return value types matters, but, Rocks needs to detect that Copy() can't be mocked.
This was found on Amazon.Runtime.SSOImmutableCredentials
To reproduce:
This gives the following error:
I don't know if the inheritance relationship with the return value types matters, but, Rocks needs to detect that
Copy()can't be mocked.This was found on
Amazon.Runtime.SSOImmutableCredentials