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

Disallow let as identifier name in patterns #839

Merged
merged 2 commits into from Jun 20, 2019

Conversation

kaicataldo
Copy link
Contributor

@kaicataldo kaicataldo commented Jun 19, 2019

fixes #837

Similar change to babel/babel#10099.

The changes here do two things:

  1. Throw a recoverable error when let is used as an identifier as a lexically bound name in object/array patterns. Relevant part of spec.
  2. Change the error message for the same pattern above to correctly report let as a reserved word in strict mode. Relevant part of spec.

I'm definitely no expert at reading the spec, so please let me know if something is amiss. Thanks!

@marijnh marijnh merged commit 20573f3 into acornjs:master Jun 20, 2019
@marijnh
Copy link
Member

marijnh commented Jun 20, 2019

Thank you!

@kaicataldo kaicataldo deleted the fixes837 branch June 24, 2019 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

let { let } should be invalid
2 participants