Debian Codegraph @

js/src/tests/test262/language/expressions/async-generator/early-errors-expression-label-name-await.js

raw
1 // |reftest| error:SyntaxError
2 // Copyright 2017 the V8 project authors. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4
5 /*---
6 author: Caitlin Potter <[email protected]>
7 esid: sec-identifiers-static-semantics-early-errors
8 description: >
9 `await` is a reserved keyword within async generator function bodies and may
10 not be used as a label.
11 info: |
12 BindingIdentifier : await
13
14 It is a Syntax Error if this production has an [Await] parameter.
15 negative:
16 phase: parse
17 type: SyntaxError
18 features: [async-iteration]
19 ---*/
20
21 $DONOTEVALUATE();
22
23 (async function*() {
24 await: 1;
25 });