-
Notifications
You must be signed in to change notification settings - Fork 896
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
Missing an early error of ES2016 (ES7) #423
Comments
We're not supporting much of ES2016 yet. Do you happen to know why this innocent-looking form is marked as an early error? |
From a TC39 Meeting Note: https://github.com/rwaldron/tc39-notes/blob/master/es7/2015-07/july-29.md#611-the-scope-of-use-strict-with-respect-to-destructuring-in-parameter-lists The main reason seems performance. |
Thanks for the link! |
@marijnh ES2016 is ES7, which Acorn supports (I helped add it, A bit more info from my research: the problem is that strict mode is supposed to apply to function parameters when |
I'll try to add this. |
@nzakas Thanks for the thorough explanation! |
In ES2016, you can no longer have "use strict" in the body of a function that has complex parameters (destructured or using default values). Fixes acornjs#423
In ES2016, this code raises a syntax error.
But Acorn (current HEAD: 7323217) succeeded parsing the code.
(Note: this is a valid syntax in ES2015.)
The text was updated successfully, but these errors were encountered: