Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / language / module-code / parse-err-hoist-lex-gen.js
blob5eeb4103876afe14e8359d67eb024c6d2c334510
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 description: >
6     Generator function declarations are interpreted as lexically-scoped in
7     module code
8 esid: sec-module-semantics-static-semantics-lexicallydeclarednames
9 info: |
10     ModuleItem : StatementListItem
12         1. Return LexicallyDeclaredNames of StatementListItem.
14     15.2.1.1 Static Semantics: Early Errors
16     - It is a Syntax Error if any element of the LexicallyDeclaredNames of
17       ModuleItemList also occurs in the VarDeclaredNames of ModuleItemList.
18 negative:
19   phase: parse
20   type: SyntaxError
21 flags: [module]
22 features: [generators]
23 ---*/
25 $DONOTEVALUATE();
27 var g;
28 function* g() {}