tests/auto/qml/ecmascripttests/test262/test/language/expressions/generators/yield-star-before-newline.js
raw| 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 | es6id: 14.4 |
| 8 | features: [generators] |
| 9 | ---*/ |
| 10 | |
| 11 | var result; |
| 12 | var g = function*() { |
| 13 | yield * |
| 14 | g2(); |
| 15 | }; |
| 16 | var g2 = function*() {}; |
| 17 | |
| 18 | result = g().next(); |
| 19 | assert.sameValue(result.value, undefined); |
| 20 | assert.sameValue(result.done, true); |