yield-strict-strict.js (529B)
1 // |reftest| error:SyntaxError 2 'use strict'; 3 // Copyright (C) 2016 the V8 project authors. All rights reserved. 4 // This code is governed by the BSD license found in the LICENSE file. 5 /*--- 6 esid: sec-scripts 7 es6id: 15.1 8 description: > 9 The `yield` token is interpreted as an Identifier when it appears in global 10 code (strict mode) 11 info: | 12 Syntax 13 14 Script : 15 ScriptBodyopt 16 17 ScriptBody : 18 StatementList[~Yield, ~Return] 19 flags: [onlyStrict] 20 negative: 21 phase: parse 22 type: SyntaxError 23 ---*/ 24 25 $DONOTEVALUATE(); 26 27 yield;