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

[parser] `let` in catch clause is not an error in sloppy #10413

pvdz opened this issue Sep 7, 2019 · 4 comments


Copy link

commented Sep 7, 2019

Bug Report

The let identifier should be valid in a catch clause in sloppy (non-strict) mode but this appears to be invalid.

Current Behavior

The let identifier is special in strict mode but not a keyword in non-strict mode. In this case Babel still throws over it where I think it should not.

Input Code

try {} catch (let) {}

Expected behavior/code

Should pass.


Babel 7.5.5

Possible Solution

Update heuristics to detect this :)

Additional context/Screenshots

I hope I'm not missing some weird exception in the spec but as far as I can see there is none and this should pass.


This comment has been minimized.

Copy link

commented Sep 7, 2019

Hey @pvdz! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite.

@JLHwung JLHwung added pkg: parser and removed i: needs triage labels Sep 11, 2019


This comment has been minimized.

Copy link

commented Sep 11, 2019

Think i can fix it!


This comment has been minimized.

Copy link

commented Sep 11, 2019

If you need any help, feel free to ask in our slack channel! (In #development)

@JLHwung JLHwung added the help wanted label Sep 12, 2019


This comment has been minimized.

Copy link

commented Sep 13, 2019


  • still in working


  • have trabbles with internet connection, slowly prepare mr


  • finally i got internet back and now continue work on this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
5 participants
You can’t perform that action at this time.