generator.js (432B)
1 // Copyright (C) 2014 the V8 project authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 /*--- 4 es6id: 12.2.5 5 description: > 6 computed property names can be used as the name of a generator method in an object 7 includes: [compareArray.js] 8 ---*/ 9 var object = { 10 *['a']() { 11 yield 1; 12 yield 2; 13 } 14 }; 15 assert.compareArray( 16 Object.keys(object), 17 ['a'] 18 ); 19 20 reportCompare(0, 0);