Closed rbuckton closed 1 year ago
This bans the use of await as an identifier in a using declaration, to ensure forwards compatibility with https://github.com/tc39/proposal-async-explicit-resource-management/. This is necessary because await is a valid BindingIdentifier in non-strict-mode code, per 13.1.1 Static Semantics: Early Errors, and using declarations are legal in non-strict-mode code.
await
using
If we do not explicitly ban await, we would be unable to introduce the using await declaration due to the syntactic ambiguity.
using await
A preview of this PR can be found at https://tc39.es/proposal-explicit-resource-management/pr/138.
This was approved by consensus in the January 2023 TC39 plenary session.
This bans the use of
await
as an identifier in ausing
declaration, to ensure forwards compatibility with https://github.com/tc39/proposal-async-explicit-resource-management/. This is necessary becauseawait
is a valid BindingIdentifier in non-strict-mode code, per 13.1.1 Static Semantics: Early Errors, andusing
declarations are legal in non-strict-mode code.If we do not explicitly ban
await
, we would be unable to introduce theusing await
declaration due to the syntactic ambiguity.