Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/object/method-definition/yield-as-function-expression-binding-identifier.js

raw
1 // Copyright (C) 2013 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 `yield` may be used as the binding identifier of a function expression
7 within generator bodies.
8 features: [generators]
9 es6id: 14.1
10 flags: [noStrict]
11 ---*/
12
13 var result;
14 var obj = {
15 *g() {
16 (function yield() {});
17 }
18 };
19
20 result = obj.g().next();
21
22 assert.sameValue(result.value, undefined);
23 assert.sameValue(result.done, true);