Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/object/concise-generator.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 es6id: 12.2.5
5 description: >
6 super method calls in object literal concise generator
7 features: [generators]
8 ---*/
9 var proto = {
10 method() {
11 return 42;
12 }
13 };
14
15 var object = {
16 *g() {
17 yield super.method();
18 }
19 };
20
21 Object.setPrototypeOf(object, proto);
22
23 assert.sameValue(
24 object.g().next().value,
25 42,
26 "The value of `object.g().next().value` is `42`, after executing `Object.setPrototypeOf(object, proto);`, where `object " + String(object) + "`"
27 );