You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
internalinterfaceIInterface{voidInvoke()=>Console.WriteLine(nameof(IInterface));}internalclassParentClass:IInterface;
internal class ChildClass :ParentClass,IInterface// BUG: RCS1182 triggered here{publicvoidInvoke()=>Console.WriteLine(nameof(ChildClass));}
...IInterface x =newChildClass();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).
Product and Version Used:
Roslynator 4.12.4
Steps to Reproduce:
Actual Behavior:
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
The text was updated successfully, but these errors were encountered: