-
Notifications
You must be signed in to change notification settings - Fork 46
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
for-in cannot be parsed #116
Comments
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_for-in_initializer Should be only an error in strict mode. |
Found some trouble, it seems there are some js features (for example In node:
|
I could find the case in ECMA2020 spec about
|
Add ref: while for-in error only applies in strict mode, for-of error is universal. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_for-of_initializer |
The following for-in statement cannot be parsed in Meriyah, but works fine in Acorn. The Chrome browser can also parse it when entering it in the console window.
for(var a = /a/ in []);
-Thomas
The text was updated successfully, but these errors were encountered: