Open
Description
Description
An FP is raised when a class is implementing a class and an interface - when the interface is not yet implemented by the class.
Repro steps
class Foo { }
interface IBar
{
int Test();
}
class Bar : Foo, IBar { } // Error [CS0535]
// Noncompliant@-1 {{'Foo' implements 'IBar' so 'IBar' can be removed from the inheritance list.}}
Expected behavior
An issue should not be raised as Foo
is not implementing IBar
Known workarounds
Implementing the interface in IBar
in Foo
stops raising the issue.
Related information
- C#/VB.NET 8.53
Activity