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: check await when parsing AsyncArrowBindingIdentifier #10953



Copy link

JLHwung commented Jan 2, 2020

Q                       A
Fixed Issues? When parsing AsyncArrowBindingIdentifier, we should check if it is await.
Patch: Bug Fix? Yes
Tests Added + Pass? Yes
License MIT

When parsing

async [no LineTerminator here] AsyncArrowBindingIdentifier[?Yield] [no LineTerminator here] =>

the await check is missing so babel does not throw on async await => {}, this PR adds the context manipulation step also used in parseParenAndDistinguishExpression.

@nicolo-ribaudo nicolo-ribaudo merged commit a283537 into babel:master Jan 3, 2020
4 of 5 checks passed
4 of 5 checks passed
build (13.x)
test262 Workflow: test262
Travis CI - Pull Request Build Passed
build-standalone Workflow: build-standalone
e2e Workflow: e2e
@nicolo-ribaudo nicolo-ribaudo deleted the JLHwung:fix-async-arrow-binding-identifier branch Jan 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.