yield-star-before-newline.js (492B)
1 // Copyright (C) 2013 the V8 project authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 description: > 6 The right-hand side of a `yield *` expression may appear on a new line. 7 features: [generators] 8 es6id: 14.4 9 ---*/ 10 11 var result; 12 var obj = { 13 *g() { 14 yield * 15 g2() 16 } 17 }; 18 var g2 = function*() {}; 19 20 result = obj.g().next(); 21 assert.sameValue(result.value, undefined); 22 assert.sameValue(result.done, true); 23 24 reportCompare(0, 0);