Skip to content

ASTScope: Clean up handling of PatternBindingDecls and AccessorDecls #34021

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 22, 2020

Conversation

slavapestov
Copy link
Contributor

@slavapestov slavapestov commented Sep 22, 2020

No description provided.

@slavapestov slavapestov changed the title Astscope invalid pbds ASTScope: Clean up handling of PatternBindingDecls and AccessorDecls Sep 22, 2020
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

Copy link
Contributor

@davidungar davidungar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be great if it works; I hope things have changed enough since the original was written that it will.

Is there still an assertion check somewhere to detect the overlapping source ranges if the bugs ever come back? If not, what will be the symptom?

@slavapestov
Copy link
Contributor Author

@davidungar Yes, when I disabled the specialized check for PatternBindingDecls, another assertion fired later on about overlapping source ranges.

This was happening in the error recovery path when parsing accessors
on a pattern binding declaration that does not bind any variables, eg

let _: Int { 0 }
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov slavapestov merged commit 007c814 into swiftlang:master Sep 22, 2020
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.

2 participants