Skip to content

[6.0] Fix up a mismatch between effect specifier lookahead and parsing #2662

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

Conversation

bnbarham
Copy link
Contributor

Lookahead was not consuming typed throw's error argument during
lookahead for closures. `atFunctionTypeArrow` did mostly handle it, but
only consumed a single token and thus wouldn't match `throws(any
Error)`. Handle this in `consumeEffectsSpecifiers` and then use this for
both.

Fixes swiftlang#2648.
Resolves rdar://127750606.

(cherry picked from commit 5887f40)
@bnbarham bnbarham requested a review from DougGregor May 21, 2024 00:11
@bnbarham bnbarham requested a review from ahoppen as a code owner May 21, 2024 00:11
@bnbarham
Copy link
Contributor Author

@swift-ci please test

@bnbarham bnbarham merged commit 115a651 into swiftlang:release/6.0 May 22, 2024
3 checks passed
@bnbarham bnbarham deleted the cherry-typed-throws-misparse branch May 22, 2024 18:02
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.

3 participants