You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Those that are always allowed as identifiers, but also appear as keywords within certain syntactic productions, at places where Identifier is not allowed: as, async, from, get, meta, of, set, and target.
But, currently, it raises an error when calling a function named async.
To Reproduce
Run the following code:
async();
Uncaught "SyntaxError": "expected token 'function', got '(' in async function declaration at line 1, col 6"
Expected behavior
It should be a reference error, or running ok if "async" function is defined.
Note that async should be recognized as a keyword in the following case.
Describe the bug
async
is a keyword, but also allowed as an identifier.https://tc39.es/ecma262/#sec-keywords-and-reserved-words
But, currently, it raises an error when calling a function named
async
.To Reproduce
Run the following code:
Uncaught "SyntaxError": "expected token 'function', got '(' in async function declaration at line 1, col 6"
Expected behavior
It should be a reference error, or running ok if "async" function is defined.
Note that
async
should be recognized as a keyword in the following case.Additional context
Mentioned in #2269
The text was updated successfully, but these errors were encountered: