private-indirect-eval-contains-arguments.js (774B)
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-decl-private-fields-indirect-eval.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 class C { 18 #x = (0, eval)('arguments;'); 19 x() { 20 return this.#x; 21 } 22 } 23 assert.sameValue(new C().x(), arguments); 24 25 reportCompare(0, 0);