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

False positive in Redundant Set Access Control Rule #2182

Closed
2 tasks done
jpsim opened this issue May 5, 2018 · 0 comments
Closed
2 tasks done

False positive in Redundant Set Access Control Rule #2182

jpsim opened this issue May 5, 2018 · 0 comments
Labels
bug Unexpected and reproducible misbehavior.

Comments

@jpsim
Copy link
Collaborator

jpsim commented May 5, 2018

New Issue Checklist

Bug Report

Private has different meanings when at the top-level vs nested. Top-level effectively means "fileprivate" whereas nested means "private within this scope".

Repro:

private final class A {
    private(set) var value: Int
    ^ warning: Redundant Set Access Control Rule Violation: Property setter access level shouldn't be explicit if it's the same as the variable access
}

In this case, the code is acceptable and we shouldn't require fileprivate final class A.

This rule was added in #2036.

@jpsim jpsim added the bug Unexpected and reproducible misbehavior. label May 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected and reproducible misbehavior.
Projects
None yet
Development

No branches or pull requests

1 participant