early-dup-top-function-async-generator.js 572 B

1234567891011121314151617181920
  1. // Copyright 2021 Chengzhong Wu. All rights reserved.
  2. // This code is governed by the BSD license found in the LICENSE file.
  3. /*---
  4. esid: sec-module-semantics-static-semantics-early-errors
  5. description: >
  6. It is a Syntax Error if the LexicallyDeclaredNames of ModuleItemList
  7. contains any duplicate entries.
  8. At the top level of a Module, function declarations are treated like
  9. lexical declarations rather than like var declarations.
  10. flags: [module]
  11. negative:
  12. phase: parse
  13. type: SyntaxError
  14. ---*/
  15. $DONOTEVALUATE();
  16. function x() {}
  17. async function* x() {}