Debian Codegraph @

js/src/tests/test262/language/statements/function/param-dflt-yield-strict-strict.js

raw
1 // |reftest| error:SyntaxError
2 'use strict';
3 // Copyright (C) 2016 the V8 project authors. All rights reserved.
4 // This code is governed by the BSD license found in the LICENSE file.
5 /*---
6 esid: sec-function-definitions
7 es6id: 14.1
8 description: >
9 The `yield` token is interpreted as an IdentifierReference within a generator
10 and outside of strict mode
11 info: |
12 FunctionDeclaration[Yield, Default] :
13 function BindingIdentifier[?Yield] ( FormalParameters ) { FunctionBody }
14 features: [generators, default-parameters]
15 flags: [onlyStrict]
16 negative:
17 phase: parse
18 type: SyntaxError
19 ---*/
20
21 $DONOTEVALUATE();
22
23 function *g() {
24 function f(x = yield) {
25 paramValue = x;
26 }
27 }