Debian Codegraph @

js/src/tests/test262/language/block-scope/syntax/redeclaration/inner-block-var-name-redeclaration-attempt-with-class.js

raw
1 // |reftest| error:SyntaxError
2 // This file was procedurally generated from the following sources:
3 // - src/declarations/class.case
4 // - src/declarations/redeclare/block-attempt-to-redeclare-inner-block-var-declaration.template
5 /*---
6 description: redeclaration with ClassDeclaration (VariableDeclaration in a BlockStatement inside a 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 any element of the LexicallyDeclaredNames of
16 StatementList also occurs in the VarDeclaredNames of StatementList.
17
18 Static Semantics: VarDeclaredNames
19
20 Block : { }
21
22 1. Return a new empty List.
23
24 StatementList : StatementList StatementListItem
25
26 1. Let names be VarDeclaredNames of StatementList.
27 2. Append to names the elements of the VarDeclaredNames of StatementListItem.
28 3. Return names.
29
30 StatementListItem : Declaration
31
32 1. Return a new empty List.
33
34 ---*/
35
36
37 $DONOTEVALUATE();
38
39 { { var f; } class f {}; }