async-gen-named-func-expr-fn-body-cntns-arguments-lex-bind-declare-arguments.js (740B)
1 // This file was procedurally generated from the following sources: 2 // - src/direct-eval-code/declare-arguments.case 3 // - src/direct-eval-code/default/async-gen-named-func-expr/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 features: [globalThis] 8 flags: [generated, noStrict] 9 ---*/ 10 11 const oldArguments = globalThis.arguments; 12 let f = async function * f(p = eval("var arguments")) { 13 let arguments; 14 } 15 16 assert.throws(SyntaxError, f); 17 assert.sameValue(globalThis.arguments, oldArguments, "globalThis.arguments unchanged"); 18 19 20 reportCompare(0, 0);