-
Notifications
You must be signed in to change notification settings - Fork 903
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
parse error on static blocks containing await accessor param #1106
Comments
see https://262.ecma-international.org/12.0/#prod-MethodDefinition, I believe it's invalide syntax. |
It seems to parse in Chrome, Firefox, but not Safari: Update: Here's the test262 test: Update: Ah I see it's part of
Looks like it's part of the static blocks proposal which hit stage 4 in August 2021 and is now supported by Chrome/Firefox: Spec link: |
I'm not actually seeing a parse error for this code in the current version of Acorn. How are you testing this? |
I used accorn v8.5.0 to reproduce this problem. |
What did you set |
still can reproduce after upgrade to 8.7.0, with ecma 2022 |
The error message: Uncaught SyntaxError: Cannot use keyword 'await' outside an async function (4:19) |
Right, if you add |
@marijnh Ah yes, as "module" it does error as expected. module example: Thanks! |
@rwaldron (who runs test262 for fun) found this bit of code that is technically valid (its function is beyond me) but found that acorn throws a parse error trying to process it. Reporting as a heads up:
The text was updated successfully, but these errors were encountered: