Debian Codegraph @

js/src/tests/test262/language/eval-code/direct/arrow-fn-body-cntns-arguments-func-decl-arrow-func-declare-arguments-assign.js

raw
1 // This file was procedurally generated from the following sources:
2 // - src/direct-eval-code/arrow-func-declare-arguments-assign.case
3 // - src/direct-eval-code/arrow-func/fn-body-cntns-arguments-func-decl.template
4 /*---
5 description: Declare "arguments" and assign to it in direct eval code (Declare |arguments| when the function body contains an |arguments| function declaration.)
6 esid: sec-evaldeclarationinstantiation
7 flags: [generated, noStrict]
8 ---*/
9
10 const oldArguments = globalThis.arguments;
11 let count = 0;
12 const f = (p = eval("var arguments = 'param'")) => {
13 function arguments() {}
14 assert.sameValue(typeof arguments, "function");
15
16 count++;
17 }
18 f();
19 assert.sameValue(count, 1);
20 assert.sameValue(globalThis.arguments, oldArguments, "globalThis.arguments unchanged");
21
22 reportCompare(0, 0);