Debian Codegraph @

js/src/tests/test262/language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-const.js

raw
1 // |reftest| error:SyntaxError
2 // This file was procedurally generated from the following sources:
3 // - src/declarations/const.case
4 // - src/declarations/redeclare/switch-attempt-to-redeclare-async-function-declaration.template
5 /*---
6 description: redeclaration with const-LexicalDeclaration (AsyncFunctionDeclaration in SwitchStatement)
7 esid: sec-switch-statement-static-semantics-early-errors
8 features: [async-functions]
9 flags: [generated]
10 negative:
11 phase: parse
12 type: SyntaxError
13 info: |
14 SwitchStatement : switch ( Expression ) CaseBlock
15
16 It is a Syntax Error if the LexicallyDeclaredNames of CaseBlock contains any
17 duplicate entries.
18
19 ---*/
20
21
22 $DONOTEVALUATE();
23
24 switch (0) { case 1: async function f() {} default: const f = 0 }