tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

inner-block-var-redeclaration-attempt-after-const.js (1085B)


      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-inner-block-var-declaration-after.template
      5 /*---
      6 description: redeclaration with const-LexicalDeclaration (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 { const f = 0; { var f; } }