Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/async-generator/early-errors-expression-label-name-yield.js

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