-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[5.0][TypeChecker] Drop @autoclosure attribute from invalid parameters #22229
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
@AnnaZaks original PR reviewed by @DougGregor |
@swift-ci please test |
@swift-ci please test source compatibility |
Build failed |
Build failed |
Ah right, we didn't merge the patch for typealias into 5.0, going to update the test. |
While forming/validating parameters make sure that the type is indeed a function type before marking it as `autoclosure` based on type representative attributes, because parser doesn't change attributes even after the error has been found and diagnosed. Resolves: rdar://problem/47586626 (cherry picked from commit 9da67c1)
13c1bb1
to
31a4d4c
Compare
@swift-ci please test |
@swift-ci please test source compatibility |
Build failed |
Build failed |
@xedin I can cherry pick the fix into the 5.0 branch if you want (if it’s possible) |
@theblixguy Thanks, but we are trying to limit changes to 5.0 branch to critical bug fixes and autoclosure didn't work with typealias in 4.2, so it's not a regression. |
While forming/validating parameters make sure that the type is indeed
a function type before marking it as
autoclosure
based on typerepresentative attributes, because parser doesn't change attributes
even after the error has been found and diagnosed.
Resolves: rdar://problem/47586626
(cherry picked from commit 9da67c1)