Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/statements/let/syntax/let-newline-await-in-normal-function.js

raw
1 // Copyright (C) 2017 Mozilla Corporation. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 author: Jeff Walden <[email protected]>
6 esid: sec-let-and-const-declarations
7 description: >
8 `let await` does not permit ASI in between, as `await` is a BindingIdentifier
9 info: |
10 `await` is a perfectly cromulent binding name in any context grammatically, just
11 prohibited by static semantics in some contexts. Therefore ASI can never apply
12 between `let` (where a LexicalDeclaration is permitted) and `await`,
13 so a subsequent `0` where `=` was expected is a syntax error.
14 negative:
15 phase: parse
16 type: SyntaxError
17 ---*/
18
19 throw "Test262: This statement should not be evaluated.";
20
21 function f() {
22 let
23 await 0;
24 }