Skip to content

Remove incorrect early exit from type access checking. #4909

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

Conversation

jrose-apple
Copy link
Contributor

  • Explanation: An early exit from Swift 2's access control checking was causing us not to check access at all for the types of private declarations in Swift 3. Removing the early exit alone could result in breaking code that was valid in Swift 3.0GM, so instead this logic downgrades any check that would have been skipped to a warning. We can remove this downgrading in the future.
  • Scope: Affects checking for the types of any declarations declared private or fileprivate, or nested within types declared private or fileprivate.
  • Issue: SR-2579
  • Reviewed by: @jckarter
  • Risk: Low. Should only introduce warnings, not errors, and does no more work than you'd already get for internal or public checking.
  • Testing: Added compiler regression tests, verified that the originally reported case now gets a warning.

…-checking

Remove incorrect early exit from type access checking.

https://bugs.swift.org/browse/SR-2579
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - b2c2e99
Test requested by - @jrose-apple

This isn't even what we're really testing; it's just to keep -verify happy.
@jrose-apple
Copy link
Contributor Author

Expected output updated.

@swift-ci Please test

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@tkremenek tkremenek merged commit ed060de into swiftlang:swift-3.0-branch Sep 22, 2016
@jrose-apple jrose-apple deleted the swift-3-fix-private-access-checking branch September 22, 2016 15:34
aaditya-chandrasekhar pushed a commit to val-verde/swift that referenced this pull request Sep 30, 2022
[pull] swiftwasm-release/5.7 from release/5.7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants