-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Diagnose typealiases of non-public types in inlinable functions #23912
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
Diagnose typealiases of non-public types in inlinable functions #23912
Conversation
...as a warning, since we didn't check this correctly in Swift 5. For parseable interfaces, these typealiases won't work at all.
@swift-ci Please test |
@swift-ci Please test source compatibility |
@swift-ci Please smoke test compiler performance |
@@ -176,6 +177,11 @@ bool TypeChecker::diagnoseInlinableDeclRefAccess(SourceLoc loc, | |||
diagName = accessor->getStorage()->getFullName(); | |||
} | |||
|
|||
// Swift 5.0 did not check the underlying types of local typealiases. | |||
// FIXME: Conditionalize this once we have a new language mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still worried about these. This is the second one I'm adding. Should we be using isSwiftVersionAtLeast(9999)
in the mean time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
Debug source compat failure is on a machine that looks like it ran out of disk space; given the success of the release one I'm going to merge. |
…tlang#23912) ...as a warning, since we didn't check this correctly in Swift 5. For parseable interfaces, these typealiases won't work at all. (cherry picked from commit a15dec8)
...as a warning, since we didn't check this correctly in Swift 5. For parseable interfaces, these typealiases won't work at all.