Description
Hiding a member with new causes a compilation error.
Expected Behavior
Application to compile.
Actual Behavior
Application does not compile.
Steps to Reproduce
public interface IBase
{
void SomeMethod();
}
public interface IDerived : IBase
{
new void SomeMethod();
}
public class Tester
{
[Test]
public async Task NewInDerived()
{
var mock = IDerived.Mock();
}
}
TUnit Version
1.55.2
.NET Version
.NET 10
Operating System
Windows
IDE / Test Runner
dotnet CLI (dotnet test / dotnet run)
Error Output / Stack Trace
TUnit.Mocks.SourceGenerator\TUnit.Mocks.SourceGenerator.MockGenerator\IDerived_Mock.g.cs(5,80): error CS0535: 'IDerivedMock' does not implement interface member 'IBase.SomeMethod()
Additional Context
No response
IDE-Specific Issue?
Description
Hiding a member with
newcauses a compilation error.Expected Behavior
Application to compile.
Actual Behavior
Application does not compile.
Steps to Reproduce
TUnit Version
1.55.2
.NET Version
.NET 10
Operating System
Windows
IDE / Test Runner
dotnet CLI (dotnet test / dotnet run)
Error Output / Stack Trace
Additional Context
No response
IDE-Specific Issue?
dotnet testordotnet run, not just in my IDE