Debian Codegraph @

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

raw
1 // |reftest| error:SyntaxError
2 // This file was procedurally generated from the following sources:
3 // - src/declarations/async-generator.case
4 // - src/declarations/redeclare/block-attempt-to-redeclare-inner-block-var-declaration.template
5 /*---
6 description: redeclaration with AsyncGeneratorDeclaration (VariableDeclaration in a BlockStatement inside a BlockStatement)
7 esid: sec-block-static-semantics-early-errors
8 features: [async-iteration]
9 flags: [generated]
10 negative:
11 phase: parse
12 type: SyntaxError
13 info: |
14 Block : { StatementList }
15
16 It is a Syntax Error if any element of the LexicallyDeclaredNames of
17 StatementList also occurs in the VarDeclaredNames of StatementList.
18
19 Static Semantics: VarDeclaredNames
20
21 Block : { }
22
23 1. Return a new empty List.
24
25 StatementList : StatementList StatementListItem
26
27 1. Let names be VarDeclaredNames of StatementList.
28 2. Append to names the elements of the VarDeclaredNames of StatementListItem.
29 3. Return names.
30
31 StatementListItem : Declaration
32
33 1. Return a new empty List.
34
35 ---*/
36
37
38 $DONOTEVALUATE();
39
40 { { var f; } async function* f() {}; }