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

Open
pvdz opened this issue Sep 7, 2019 · 4 comments

Comments

@pvdz
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

https://astexplorer.net/#/gist/15eb31fbb1024faa6f42a4940d8beb4a/50b40e18038bb65c40bc3257e886093a206ad411

try {} catch (let) {}

Expected behavior/code

Should pass.

Environment

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.

@babel-bot

This comment has been minimized.

Copy link
Collaborator

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

@bre30kra69cs

This comment has been minimized.

Copy link

commented Sep 11, 2019

Think i can fix it!

@nicolo-ribaudo

This comment has been minimized.

Copy link
Member

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

@bre30kra69cs

This comment has been minimized.

Copy link

commented Sep 13, 2019

13.09.2019

  • still in working

15.09.2019

  • have trabbles with internet connection, slowly prepare mr

18.09.2019

  • 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
Projects
None yet
5 participants
You can’t perform that action at this time.