Closed
Description
Bug Report
π Search Terms
for async of syntax error
π Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
β― Playground Link
Playground link with relevant code
π» Code
var async;
for (async of [42]) {}
console.log(async);
π Actual behavior
no error reported.
π Expected behavior
The compiler should throw a syntax error: Uncaught SyntaxError: The left-hand side of a for-of loop may not be 'async'
.
context: tc39/ecma262#2034