Debian Codegraph @

js/src/tests/test262/language/module-code/parse-err-hoist-lex-gen.js

raw
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
11
12 1. Return LexicallyDeclaredNames of StatementListItem.
13
14 15.2.1.1 Static Semantics: Early Errors
15
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 ---*/
24
25 $DONOTEVALUATE();
26
27 var g;
28 function* g() {}