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
Thank you for pointing this issue to us and sorry for the delay.
I believe this is raised correctly, the rule is about avoiding making members inaccessible during interface implementation.
Whether the interface is internal or public should not make a difference.
However, as you pointed out, the rule description does not match the actual behavior.
The description should not suggest this rule applies only to public interface.
sebastien-marichal
changed the title
Fix S4039 FP: Should not be raised for internal interfaces
S4039: Update RSPEC to align with rule implementation
Nov 28, 2023
Description
S4039 should not be raised for explicitly implementing internal interfaces.
According to the description, the rule is intended for public interfaces.
Repro steps
internal interface IMyInternalInterface
{
void InternalMethod();
}
public class TheImplementation : IMyInternalInterface
{
void IMyInternalInterface.InternalMethod() // S4039 should not be raised here
{
// foo
}
}
Expected behavior
S4039 should not be raised for explicitly implementing internal interfaces.
Actual behavior
S4039 raised.
Known workarounds
N/A
Related information
The text was updated successfully, but these errors were encountered: