yield-as-function-expression-binding-identifier.js (503B)
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 `yield` may be used as the binding identifier of a function expression 7 within generator bodies. 8 es6id: 14.1 9 flags: [noStrict] 10 features: [generators] 11 ---*/ 12 13 var result; 14 function* g() { 15 (function yield() {}) 16 } 17 18 result = g().next(); 19 20 assert.sameValue(result.value, undefined); 21 assert.sameValue(result.done, true); 22 23 reportCompare(0, 0);