tor-browser

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

scope-lex-let.js (898B)


      1 // |reftest| error:ReferenceError
      2 // Copyright (C) 2020 Rick Waldron. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 /*---
      5 esid: sec-switch-statement-runtime-semantics-evaluation
      6 description: Creation of new lexical environment (into `default` clause)
      7 info: |
      8    1. Let exprRef be the result of evaluating Expression.
      9    2. Let switchValue be ? GetValue(exprRef).
     10    3. Let oldEnv be the running execution context's LexicalEnvironment.
     11    4. Let blockEnv be NewDeclarativeEnvironment(oldEnv).
     12    5. Perform BlockDeclarationInstantiation(CaseBlock, blockEnv).
     13    6. Set the running execution context's LexicalEnvironment to blockEnv.
     14    7. Let R be the result of performing CaseBlockEvaluation of CaseBlock with
     15      argument switchValue.
     16    [...]
     17 negative:
     18  phase: runtime
     19  type: ReferenceError
     20 ---*/
     21 
     22 switch (0) { default: /*{ body }*/ }
     23 f;