mirror of
https://github.com/tc39/test262.git
synced 2025-07-26 23:44:27 +02:00
fixup! Add tests for MethodDefinition forms new to ES6
Update test according to latest change to ES6 spec: https://twitter.com/awbjs/status/603251578070552576
This commit is contained in:
parent
30a4a5da7d
commit
b2a62444fc
@ -3,26 +3,16 @@
|
|||||||
|
|
||||||
/*---
|
/*---
|
||||||
description: >
|
description: >
|
||||||
When the `yield` keyword occurs within the Initializer of a
|
The Initializer of a SingleNameBinding witihn the FormalParameters of a
|
||||||
SingleNameBinding witihn the FormalParameters of a GeneratorMethod, it
|
GeneratorMethod may not contain the `yield` keyword.
|
||||||
behaves as a YieldExpression.
|
|
||||||
es6id: 14.4
|
es6id: 14.4
|
||||||
features: [generators]
|
features: [generators]
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
|
negative: SyntaxError
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var yield = 'defaultViaIdentifier';
|
(function*() {
|
||||||
var obj;
|
({
|
||||||
var iter = (function*() {
|
*method(x = yield) {}
|
||||||
obj = {
|
});
|
||||||
*method(x = yield) {
|
});
|
||||||
return x;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}());
|
|
||||||
|
|
||||||
iter.next();
|
|
||||||
|
|
||||||
iter.next('defaultViaExpression');
|
|
||||||
|
|
||||||
assert.sameValue(obj.method().next(), 'defaultViaExpression');
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user