parse-err-yield.js (623B)
1 // |reftest| error:SyntaxError module 2 // Copyright (C) 2016 the V8 project authors. All rights reserved. 3 // This code is governed by the BSD license found in the LICENSE file. 4 /*--- 5 esid: sec-modules 6 es6id: 15.2 7 description: YieldExpression may not be used directly within ModuleBody 8 info: | 9 Syntax 10 11 Module : 12 ModuleBodyopt 13 14 ModuleBody : 15 ModuleItemList 16 17 ModuleItemList : 18 ModuleItem 19 ModuleItemList ModuleItem 20 21 ModuleItem: 22 ImportDeclaration 23 ExportDeclaration 24 StatementListItem[~Yield, ~Return] 25 flags: [module] 26 negative: 27 phase: parse 28 type: SyntaxError 29 ---*/ 30 31 $DONOTEVALUATE(); 32 33 yield;