Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/class/method-param-dflt-yield.js

raw
1 // Copyright (C) 2016 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 esid: sec-method-definitions
5 es6id: 14.3
6 description: >
7 YieldExpression cannot be used within the FormalParameters of a class method
8 info: |
9 MethodDefinition[Yield] :
10
11 PropertyName[?Yield] ( StrictFormalParameters ) { FunctionBody }
12 features: [generators, default-parameters]
13 negative:
14 phase: parse
15 type: SyntaxError
16 ---*/
17
18 throw "Test262: This statement should not be evaluated.";
19
20 0, class {
21 m(x = yield) {}
22 };