gen-func-decl-a-preceding-parameter-is-named-arguments-declare-arguments.js (710B)
1 // This file was procedurally generated from the following sources: 2 // - src/direct-eval-code/declare-arguments.case 3 // - src/direct-eval-code/default/gen-func-decl/a-preceding-parameter-is-named-arguments.template 4 /*--- 5 description: Declare "arguments" and assign to it in direct eval code (Declare |arguments| when a preceding parameter is named |arguments|.) 6 esid: sec-evaldeclarationinstantiation 7 flags: [generated, noStrict] 8 ---*/ 9 10 11 12 assert.sameValue("arguments" in this, false, "No global 'arguments' binding"); 13 14 function * f(arguments, p = eval("var arguments")) { 15 16 } 17 assert.throws(SyntaxError, f); 18 19 assert.sameValue("arguments" in this, false, "No global 'arguments' binding"); 20 21 reportCompare(0, 0);