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

[Swift 5.0]: LowerACLThanParentRule is broken #2607

Closed
jpsim opened this issue Jan 28, 2019 · 2 comments
Closed

[Swift 5.0]: LowerACLThanParentRule is broken #2607

jpsim opened this issue Jan 28, 2019 · 2 comments
Labels
bug Unexpected and reproducible misbehavior. sourcekit-issue Issues that are caused by a misbehavior in SourceKit and need to be fixed upstream.

Comments

@jpsim
Copy link
Collaborator

jpsim commented Jan 28, 2019

private class Foo { func bar() {} }
                    ^ warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)

It seems like members without an explicit ACL annotation in Swift 5 are incorrectly assumed to be internal. This causes incorrect violations in Swift 5 that aren't present in Swift 4.x.

@jpsim jpsim added the swift-5 label Jan 28, 2019
@jpsim
Copy link
Collaborator Author

jpsim commented Jan 28, 2019

I filed SR-9777 to track this.

@marcelofabri
Copy link
Collaborator

We could work around it for this rule in specific and check the annotations instead (as we don't really care about implicit ACLs here).

It'd be great to fix it on SourceKit though to avoid any surprises on other rules.

@SimplyDanny SimplyDanny added bug Unexpected and reproducible misbehavior. sourcekit-issue Issues that are caused by a misbehavior in SourceKit and need to be fixed upstream. and removed swift-5 labels Aug 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected and reproducible misbehavior. sourcekit-issue Issues that are caused by a misbehavior in SourceKit and need to be fixed upstream.
Projects
None yet
Development

No branches or pull requests

3 participants