Skip to content

ES6 modules cannot use "await" as an identifier #8559

Open
@evmar

Description

@evmar

According to http://www.ecma-international.org/ecma-262/6.0/#sec-future-reserved-words
"await is only treated as a FutureReservedWord when Module is the goal symbol of the syntactic grammar."

This code should be illegal I think:
http://www.typescriptlang.org/play/#src=import%20'foo'%3B%0A%0Alet%20await%20%3D%203%3B

Came up when discussing TS semantics with @ajklein (v8 ES6 module expert).

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptES6Relates to the ES6 Spec

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions