async-meth-fn-body-cntns-arguments-func-decl-declare-arguments.js (798B)
1 // |reftest| async 2 // This file was procedurally generated from the following sources: 3 // - src/direct-eval-code/declare-arguments.case 4 // - src/direct-eval-code/default/async-meth/fn-body-cntns-arguments-func-decl.template 5 /*--- 6 description: Declare "arguments" and assign to it in direct eval code (Declare |arguments| when the function body contains an |arguments| function declaration.) 7 esid: sec-evaldeclarationinstantiation 8 features: [globalThis] 9 flags: [generated, async, noStrict] 10 ---*/ 11 12 const oldArguments = globalThis.arguments; 13 let o = { async f(p = eval("var arguments")) { 14 function arguments() {} 15 }}; 16 o.f().then($DONE, error => { 17 assert(error instanceof SyntaxError); 18 assert.sameValue(globalThis.arguments, oldArguments, "globalThis.arguments unchanged"); 19 }).then($DONE, $DONE);