Skip to content

[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

Merged
merged 1 commit into from
Jan 30, 2019

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Jan 29, 2019

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)

@xedin xedin requested a review from AnnaZaks January 29, 2019 22:30
@xedin xedin requested a review from a team as a code owner January 29, 2019 22:30
@xedin
Copy link
Contributor Author

xedin commented Jan 29, 2019

@AnnaZaks original PR reviewed by @DougGregor

@xedin
Copy link
Contributor Author

xedin commented Jan 29, 2019

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Jan 29, 2019

@swift-ci please test source compatibility

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 13c1bb1b436367bf222121b47c7b1692ded55085

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 13c1bb1b436367bf222121b47c7b1692ded55085

@xedin
Copy link
Contributor Author

xedin commented Jan 30, 2019

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)
@xedin xedin force-pushed the rdar-47586626-5.0 branch from 13c1bb1 to 31a4d4c Compare January 30, 2019 01:17
@xedin
Copy link
Contributor Author

xedin commented Jan 30, 2019

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Jan 30, 2019

@swift-ci please test source compatibility

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 13c1bb1b436367bf222121b47c7b1692ded55085

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 13c1bb1b436367bf222121b47c7b1692ded55085

@theblixguy
Copy link
Collaborator

theblixguy commented Jan 30, 2019

@xedin I can cherry pick the fix into the 5.0 branch if you want (if it’s possible)

@xedin
Copy link
Contributor Author

xedin commented Jan 30, 2019

@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.

@AnnaZaks AnnaZaks merged commit a038463 into swiftlang:swift-5.0-branch Jan 30, 2019
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.

4 participants