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
Remove incorrect early exit from type access checking. #4904
Remove incorrect early exit from type access checking. #4904
Conversation
This was a correct compile-time optimization for Swift 2, but Swift 3 has multiple levels of "private" that need to be taken into account. This is a purely /subtractive/ change, so the next commit will downgrade this to a warning in cases where it would have been accepted in 3.0GM. https://bugs.swift.org/browse/SR-2579
...to be compatible with Swift 3. Fortunately these cases are all safe; they're the cases that would all be 'fileprivate' in Swift 2. Finishes https://bugs.swift.org/browse/SR-2579, although we'll need a follow-up bug to turn this /back/ into an error in Swift 4.
@swift-ci Please test |
Build failed |
@aleksgapp, since you've been working on the access scope patch, would you mind checking my work here? (Sorry for creating yet another merge conflict…but at least it explains what those weird conditions in checkTypeAccessibilityImpl were.) @jckarter, would you mind reviewing as well? |
Linux failure is a known-flaky Foundation test that Philippe commented about in another PR. @swift-ci Please test Linux platform |
Build failed |
Two in a row. @phausler, maybe we should just disable the test for now? |
LGTM. |
@swift-ci Please smoke test Linux platform |
…cking Remove incorrect early exit from type access checking. https://bugs.swift.org/browse/SR-2579
…then downgrade the resulting errors to warnings to be compatible with Swift 3.0GM.
This was a correct compile-time optimization for Swift 2, but Swift 3 has multiple levels of "private" that need to be taken into account. Fortunately these cases are all safe; they're the cases that would all be
fileprivate
in Swift 2.Resolves SR-2579.