tor-browser

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

global-switch-dflt-eval-global-existing-block-fn-no-init.js (771B)


      1 // This file was procedurally generated from the following sources:
      2 // - src/annex-b-fns/eval-global-existing-block-fn-no-init.case
      3 // - src/annex-b-fns/eval-global/direct-switch-dflt.template
      4 /*---
      5 description: Does not re-initialize binding created by similar forms (Funtion declaration in the `default` clause of a `switch` statement in eval code in the global scope)
      6 esid: sec-web-compat-evaldeclarationinstantiation
      7 flags: [generated, noStrict]
      8 info: |
      9    B.3.3.3 Changes to EvalDeclarationInstantiation
     10 
     11    [...]
     12    a. If declaredFunctionOrVarNames does not contain F, then
     13    [...]
     14 ---*/
     15 
     16 eval(
     17  'assert.sameValue(f, undefined);\
     18  \
     19  {\
     20    function f() {}\
     21  }switch (1) {' +
     22  '  default:' +
     23  '    function f() {  }' +
     24  '}\
     25  '
     26 );
     27 
     28 reportCompare(0, 0);