param-dflt-yield-id-non-strict.js (642B)
1 // Copyright (C) 2016 the V8 project authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 /*--- 4 esid: sec-arrow-function-definitions 5 es6id: 14.2 6 description: > 7 The `yield` token is interpreted as an IdentifierReference outside of strict 8 mode and outside of generator function bodies. 9 info: | 10 ArrowFunction[In, Yield] : 11 12 ArrowParameters[?Yield] [no LineTerminator here] => ConciseBody[?In] 13 features: [default-parameters] 14 flags: [noStrict] 15 ---*/ 16 17 var yield = 23; 18 var f, paramValue; 19 20 f = (x = yield) => { paramValue = x; }; 21 22 f(); 23 24 assert.sameValue(paramValue, 23); 25 26 reportCompare(0, 0);