Debian Codegraph @

js/src/tests/test262/language/block-scope/syntax/redeclaration/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/block-attempt-to-redeclare-function-declaration.template
5 /*---
6 description: redeclaration with const-LexicalDeclaration (FunctionDeclaration in BlockStatement)
7 esid: sec-block-static-semantics-early-errors
8 flags: [generated]
9 negative:
10 phase: parse
11 type: SyntaxError
12 info: |
13 Block : { StatementList }
14
15 It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains
16 any duplicate entries.
17
18 ---*/
19
20
21 $DONOTEVALUATE();
22
23 { function f() {} const f = 0 }