- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 273
Closed
Description
Product and Version Used:
Roslynator 4.12.4
Steps to Reproduce:
- Create an interface with a default method implementation
- Create a parent class that implements the interface
- Create a child class that inherits the parent class and implements the interface
- Add an implementation of the interface method to override the default implementation
Actual Behavior:
internal interface IInterface
{
    void Invoke() => Console.WriteLine(nameof(IInterface));
}
internal class ParentClass : IInterface;
internal class ChildClass : ParentClass, IInterface // BUG: RCS1182 triggered here
{
    public void Invoke() => Console.WriteLine(nameof(ChildClass));
}
...
IInterface x = new ChildClass();
x.Invoke();Expected Behavior:
RCS1182 should not be triggered. Removing the "redundant" interface implementation causes the default interface method not to be overridden (i.e. the example logs IInterface).
Related to #591
Metadata
Metadata
Assignees
Labels
No labels