yield-non-strict.js (574B)
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-scripts 5 es6id: 15.1 6 description: > 7 The `yield` token is interpreted as an Identifier when it appears in global 8 code (non-strict mode) 9 info: | 10 Syntax 11 12 Script : 13 ScriptBodyopt 14 15 ScriptBody : 16 StatementList[~Yield, ~Return] 17 flags: [noStrict] 18 ---*/ 19 20 // Avoid test failures in cases where the host has defined a `yield` property 21 // on the global object. 22 try { 23 yield = 0; 24 } catch (_) {} 25 26 reportCompare(0, 0);