tor-browser

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

gen-meth-fn-body-cntns-arguments-lex-bind-declare-arguments-and-assign.js (741B)


      1 // This file was procedurally generated from the following sources:
      2 // - src/direct-eval-code/declare-arguments-and-assign.case
      3 // - src/direct-eval-code/default/gen-meth/fn-body-cntns-arguments-lex-bind.template
      4 /*---
      5 description: Declare "arguments" and assign to it in direct eval code (Declare |arguments| when the function body contains an |arguments| lexical binding.)
      6 esid: sec-evaldeclarationinstantiation
      7 flags: [generated, noStrict]
      8 ---*/
      9 
     10 
     11 
     12 assert.sameValue("arguments" in this, false, "No global 'arguments' binding");
     13 
     14 let o = { * f(p = eval("var arguments = 'param'")) {
     15  let arguments;
     16 }};
     17 assert.throws(SyntaxError, o.f);
     18 
     19 assert.sameValue("arguments" in this, false, "No global 'arguments' binding");
     20 
     21 reportCompare(0, 0);