2015-03-17 18:50:15 +01:00
|
|
|
// Copyright (C) 2013 the V8 project authors. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
|
|
|
/*---
|
2017-10-04 22:12:34 +02:00
|
|
|
description: >
|
|
|
|
`yield` may be used as a literal property name in an object literal
|
|
|
|
within generator function bodies.
|
|
|
|
es6id: 12.1.1
|
|
|
|
features: [generators]
|
|
|
|
---*/
|
2015-03-17 18:50:15 +01:00
|
|
|
|
2015-04-14 19:35:10 +02:00
|
|
|
var result;
|
2015-03-17 18:50:15 +01:00
|
|
|
function* g() {
|
|
|
|
({ yield: 1 });
|
|
|
|
}
|
2015-04-14 19:35:10 +02:00
|
|
|
|
|
|
|
result = g().next();
|
|
|
|
assert.sameValue(result.value, undefined);
|
|
|
|
assert.sameValue(result.done, true);
|