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