Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/object/method-definition/generator-super-prop-body.js

raw
1 // Copyright 2015 Cubane Canada, Inc. All rights reserved.
2 // See LICENSE for details.
3
4 /*---
5 info: |
6 GeneratorMethod can reference SuperProperty in body
7 features: [generators]
8 es6id: 14.4.1
9 author: Sam Mikes
10 description: GeneratorMethod body uses SuperProperty (allowed)
11 ---*/
12
13 var obj;
14
15 var obj = {
16 *foo() {
17 return super.toString;
18 }
19 };
20
21 obj.toString = null;
22
23 assert.sameValue(obj.foo().next().value, Object.prototype.toString);