Skip to content
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

fix: triple __proto__ in object patterns should be allowed #11009

Merged
merged 1 commit into from
Jan 16, 2020

Conversation

JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Jan 15, 2020

Q                       A
Fixed Issues? Fixes #6705
Patch: Bug Fix? Yes
Tests Added + Pass? Yes
License MIT

When parsing the thrid __proto__ in ambiguous patterns, checkDuplicateProto incorrectly throws because refExpressionErrors.doubleProto has been set to the second __proto__ position. This PR fixes this issue by ignoring subsequent __proto__ if we have seen duplicate __proto__ in ambiguous patterns.

This PR is a follow-up to #10987 .

(🤦‍♂️I should not have merged it eagerly when it gets two approval)

@JLHwung JLHwung added PR: Bug Fix 🐛 A type of pull request used for our changelog categories pkg: parser PR: Spec Compliance 👓 A type of pull request used for our changelog categories and removed PR: Bug Fix 🐛 A type of pull request used for our changelog categories labels Jan 15, 2020
Copy link
Member

@existentialism existentialism left a comment

Choose a reason for hiding this comment

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

🙃

@JLHwung JLHwung merged commit a1063d2 into babel:master Jan 16, 2020
@JLHwung JLHwung deleted the refix-6705 branch January 16, 2020 14:34
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Apr 17, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: parser PR: Spec Compliance 👓 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

should allow duplicate __proto__ keys in patterns
4 participants