Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix S3242: Rule should not suggest base type resulting in inconsistent accessibility #863

Closed
Evangelink opened this issue Oct 20, 2017 · 0 comments
Assignees
Labels
Type: False Positive Rule IS triggered when it shouldn't be.
Milestone

Comments

@Evangelink
Copy link
Contributor

Description

Current code will suggest base type which can lead to inconsistent accessibility

Repro steps

namespace Something
{
    internal interface IFoo
    {
        bool IsFoo { get; }
    }

    public class Foo : IFoo
    {
        public bool IsFoo { get; set; }
    }
}

namespace Test_25
{
    public class Bar
    {
        public void MethodOne(Something.Foo f)
        {
            var x = f.IsFoo;
        }
    }
}

Expected behavior

Should not suggest IFoo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: False Positive Rule IS triggered when it shouldn't be.
Projects
None yet
Development

No branches or pull requests

1 participant