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
{{ message }}
This repository was archived by the owner on Sep 8, 2021. It is now read-only.
The proposal currently does not allow a static {} block to inherit the [Await] flag of its surrounding context. We intend to leave open the possibility of supporting this in the future, though not at this time. However, by passing [~Await] to the statement list, we allow the use of await as an identifier inside of the static {} block, which would make adopting the outer [Await] context a breaking change.
To address this concern, we should disallow await as an IdentifierReference or BindingIdentifier directly inside of a static {} block (while still allowing it inside of a function nested inside of the block).
Note that this is less of an issue with yield, as yield is treated as a reserved word in strict mode, and class bodies are always strict.
The proposal currently does not allow a
static {}block to inherit the[Await]flag of its surrounding context. We intend to leave open the possibility of supporting this in the future, though not at this time. However, by passing[~Await]to the statement list, we allow the use ofawaitas an identifier inside of thestatic {}block, which would make adopting the outer[Await]context a breaking change.To address this concern, we should disallow
awaitas an IdentifierReference or BindingIdentifier directly inside of astatic {}block (while still allowing it inside of a function nested inside of the block).Note that this is less of an issue with
yield, asyieldis treated as a reserved word in strict mode, and class bodies are always strict.Related: #7, #24