This repository was archived by the owner on Aug 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 653
fix(rome_js_parser): Ignore bindings in desctructuring initializers #3525
Merged
MichaReiser
merged 2 commits into
main
from
fix/destructuring-initializer-duplicate-binding
Oct 31, 2022
Merged
fix(rome_js_parser): Ignore bindings in desctructuring initializers #3525
MichaReiser
merged 2 commits into
main
from
fix/destructuring-initializer-duplicate-binding
Oct 31, 2022
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rome's parser implements a very limited check for duplicated bindings by testing if there are no duplicate bindings in the same variable declaration. This PR fixes an issue where the parser flagged a binding with the same name inside a destructuring initializer as a duplicated binding which is incorrect. Fixes #3521
✅ Deploy Preview for rometools canceled.
|
!bench_parser |
Parser conformance results on ubuntu-latestjs/262
jsx/babel
symbols/microsoft
ts/babel
ts/microsoft
|
Parser Benchmark Results
|
leops
approved these changes
Oct 28, 2022
Ideally this check should eventually get moved to the syntax pass of the analyzer, since it should be easier to track the scope of declarations in the semantic model than in the parser state |
Absolutely. But that's a bit more involved 😃 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rome's parser implements a very limited check for duplicated bindings by testing if there are no duplicate bindings in the same variable declaration.
This PR fixes an issue where the parser flagged a binding with the same name inside a destructuring initializer as a duplicated binding which is incorrect.
Fixes #3521 #2960