tor-browser

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

class-name-redeclaration-attempt-with-var.js (721B)


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