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 tests for for await (async of
#2979
Comments
That sounds like a meaningful test case to me. Thanks for the report! Would you like to write the test? I'm available to help you get started if you need a hand. |
I was able to write some test cases based on the existing templates in I guess I should just submit a draft PR with what I have so far? |
Great! I'm happy to give feedback on a work-in-progress. Since this issue is orthogonal to the parsing of destructuring patterns, using those templates may produce a lot of tests which aren't meaningfully distinctive for implementers. This sounds like a case for hand-written tests, but we can discuss that in the context of your patch if you prefer. |
The PR which added tests for other cases may be useful context. |
It was recently noticed (babel/babel#13235) that Babel failed to parse this code:
Unlike a regular for-of loop there is no ambiguity with
for (async of => {};;)
, and an async function expression is not legal here, soasync
can be used as the loop variable.But it's easy for the implementation to mess up by parsing
async of
as an async function anyway, or by incorrectly sharing code that prohibitsfor (async of
in a regular for-of.The text was updated successfully, but these errors were encountered: