tor-browser

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

nested-private-indirect-eval-contains-arguments.js (796B)


      1 // This file was procedurally generated from the following sources:
      2 // - src/class-elements/eval-contains-arguments.case
      3 // - src/class-elements/initializer-indirect-eval-arguments/cls-expr-private-fields-indirect-eval-nested.template
      4 /*---
      5 description: No error if `arguments` in StatementList of eval (indirect eval)
      6 esid: sec-performeval-rules-in-initializer
      7 features: [class, class-fields-public, class-fields-private]
      8 flags: [generated, noStrict]
      9 info: |
     10    For indirect eval, the "Additional Early Error Rules for Eval Inside Initializer"
     11    (in #sec-performeval-rules-in-initializer) are NOT applicable.
     12 
     13 ---*/
     14 
     15 
     16 var arguments = 1;
     17 var C = class {
     18  #x = () => (0, eval)('arguments;');
     19  x() {
     20    return this.#x();
     21  }
     22 }
     23 
     24 assert.sameValue(new C().x(), arguments);
     25 
     26 reportCompare(0, 0);