Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / language / module-code / early-dup-top-function.js
blob6b358065cc6d9c476b3d8496265ae0b47a03e2ec
1 // |reftest| error:SyntaxError module
2 // Copyright 2021 Chengzhong Wu. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
5 /*---
6 esid: sec-module-semantics-static-semantics-early-errors
7 description: >
8     It is a Syntax Error if the LexicallyDeclaredNames of ModuleItemList
9     contains any duplicate entries.
10     At the top level of a Module, function declarations are treated like
11     lexical declarations rather than like var declarations.
12 flags: [module]
13 negative:
14   phase: parse
15   type: SyntaxError
16 ---*/
18 $DONOTEVALUATE();
20 function x() {}
21 function x() {}