Skip to content

Closure Parsing Omnibus #727

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 4 commits into from
Sep 8, 2022
Merged

Closure Parsing Omnibus #727

merged 4 commits into from
Sep 8, 2022

Conversation

CodaFi
Copy link
Contributor

@CodaFi CodaFi commented Sep 8, 2022

Fixes #725, #721, and #722

Fix a regression where we didn't recognize unowned(safe) in closure
captures.

Fixes swiftlang#722

rdar://99657725
Make XCTest point at the actual expectation that failed, not the call to AssertParse
All the lookahead we did before this promised us a right bracket here, but the precedence of right brackets is too weak to overcome keywords. The attached test case shows that we fall all the way through closure signature parsing and nothing picks up the slack and eats the remaining parts of the signature.

Instead, do `expect`'s job for it and try to munge through to the right bracket ourselves.

Fixes swiftlang#721

rdar://99657721
@CodaFi CodaFi requested a review from ahoppen as a code owner September 8, 2022 00:06
@CodaFi
Copy link
Contributor Author

CodaFi commented Sep 8, 2022

@swift-ci test

@CodaFi CodaFi merged commit 745922f into swiftlang:main Sep 8, 2022
@CodaFi CodaFi deleted the closure branch September 8, 2022 02:17
CodaFi added a commit to CodaFi/swift-syntax that referenced this pull request Sep 8, 2022
This was resolved by swiftlang#727

rdar://99430613
@CodaFi CodaFi mentioned this pull request Sep 8, 2022
jpsim pushed a commit to jpsim/swift-syntax that referenced this pull request Sep 11, 2022
This was resolved by swiftlang#727

rdar://99430613
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.

Line break before the effects in a closure literal with full signature parses incorrectly
1 participant