Skip to content
This repository was archived by the owner on Sep 8, 2021. It is now read-only.
This repository was archived by the owner on Sep 8, 2021. It is now read-only.

Disallow await as an IdentifierReference or BindingIdentifier inside of a static block #27

@rbuckton

Description

@rbuckton

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.

Related: #7, #24

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions