2015-03-30 18:48:02 +02:00
|
|
|
// Copyright (C) 2014 the V8 project authors. All rights reserved.
|
2015-03-02 20:10:32 +01:00
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
|
|
es6id: 12.2.5
|
|
|
|
description: >
|
|
|
|
computed property names can be used as the name of a generator method in an object
|
|
|
|
includes: [compareArray.js]
|
|
|
|
---*/
|
|
|
|
var object = {
|
|
|
|
*['a']() {
|
|
|
|
yield 1;
|
|
|
|
yield 2;
|
|
|
|
}
|
|
|
|
};
|
2021-10-16 02:35:01 +02:00
|
|
|
assert.compareArray(
|
|
|
|
Object.keys(object),
|
|
|
|
['a']
|
2015-03-05 19:39:30 +01:00
|
|
|
);
|