Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/object/method-definition/generator-param-init-yield.js

raw
1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 description: >
6 The Initializer of a SingleNameBinding witihn the FormalParameters of a
7 GeneratorMethod may not contain the `yield` keyword.
8 es6id: 14.4
9 features: [generators]
10 flags: [noStrict]
11 negative:
12 phase: parse
13 type: SyntaxError
14 ---*/
15
16 throw "Test262: This statement should not be evaluated.";
17
18 (function*() {
19 ({
20 *method(x = yield) {}
21 });
22 });