2015-02-18 02:26:24 +01:00
|
|
|
// Copyright 2015 Cubane Canada, Inc. All rights reserved.
|
|
|
|
// See LICENSE for details.
|
|
|
|
|
|
|
|
/*---
|
2018-01-05 18:26:51 +01:00
|
|
|
info: |
|
2015-02-18 02:26:24 +01:00
|
|
|
GeneratorMethod can reference SuperProperty in body
|
2015-04-16 00:47:34 +02:00
|
|
|
features: [generators]
|
2015-02-18 02:26:24 +01:00
|
|
|
es6id: 14.4.1
|
|
|
|
author: Sam Mikes
|
|
|
|
description: GeneratorMethod body uses SuperProperty (allowed)
|
|
|
|
---*/
|
|
|
|
|
2015-05-20 22:45:26 +02:00
|
|
|
var obj;
|
|
|
|
|
2015-05-26 18:33:20 +02:00
|
|
|
var obj = {
|
|
|
|
*foo() {
|
|
|
|
return super.toString;
|
|
|
|
}
|
|
|
|
};
|
2015-05-20 22:45:26 +02:00
|
|
|
|
2015-05-26 18:33:20 +02:00
|
|
|
obj.toString = null;
|
|
|
|
|
|
|
|
assert.sameValue(obj.foo().next().value, Object.prototype.toString);
|