tor-browser

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

func-block-decl-eval-func-existing-block-fn-no-init.js (733B)


      1 // This file was procedurally generated from the following sources:
      2 // - src/annex-b-fns/eval-func-existing-block-fn-no-init.case
      3 // - src/annex-b-fns/eval-func/direct-block.template
      4 /*---
      5 description: Does not re-initialize binding created by similar forms (Block statement in eval code containing a function declaration)
      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 var init;
     16 
     17 (function() {
     18  eval(
     19    'init = f;\
     20    \
     21    {\
     22      function f() {}\
     23    }{ function f() {  } }'
     24  );
     25 }());
     26 
     27 assert.sameValue(init, undefined);
     28 
     29 reportCompare(0, 0);