nested-indirect-eval-contains-arguments.js (731B)
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-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] 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 } 20 21 assert.sameValue(new C().x(), arguments); 22 23 reportCompare(0, 0);