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: the LHS in for-of loop should not start with let #13049

Merged
merged 2 commits into from Mar 29, 2021

Conversation

JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Mar 24, 2021

Q                       A
Fixed Issues? Fixes same issue as acornjs/acorn#1009
Patch: Bug Fix? Y
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

The error message is copied from https://cs.chromium.org/chromium/src/v8/src/common/message-template.h.

A new routine isLetKeyword is extracted from isLet so we don't introduce extra contextual check of let.

@JLHwung JLHwung added PR: Spec Compliance 👓 A type of pull request used for our changelog categories pkg: parser labels Mar 24, 2021
@babel-bot
Copy link
Collaborator

babel-bot commented Mar 24, 2021

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/44651/

@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 24, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 7faa984:

Sandbox Source
babel-repl-custom-plugin Configuration
babel-plugin-multi-config Configuration

Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
@JLHwung JLHwung merged commit 8efbac4 into babel:main Mar 29, 2021
@JLHwung JLHwung deleted the fix-for-of-let-lookahead branch March 29, 2021 20:54
fisker added a commit to prettier/prettier that referenced this pull request Apr 12, 2021
thorn0 added a commit to prettier/prettier that referenced this pull request Apr 12, 2021
* Build(deps): Bump @babel/parser from 7.13.13 to 7.13.15

Bumps [@babel/parser](https://github.com/babel/babel/tree/HEAD/packages/babel-parser) from 7.13.13 to 7.13.15.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.13.15/packages/babel-parser)

Signed-off-by: dependabot[bot] <support@github.com>

* Add test for babel/babel#13099

* Test babel/babel#13049

* Test babel/babel#13101

* Add long name test

* Style

* Print necessary parens in `{ a: (b as any) = 2000 }`

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
@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 Jun 29, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 29, 2021
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.

None yet

4 participants