Prevent arguments object creation if 'arguments' function argument is present (#4849)
This patch fixes #4847. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
This commit is contained in:
@@ -199,3 +199,21 @@ function f19(e = (v) => eval(v))
|
||||
assert(arguments === -12.5)
|
||||
}
|
||||
f19(undefined, "A");
|
||||
|
||||
function f20 (arguments, a = eval('arguments')) {
|
||||
assert(a === 3.1);
|
||||
assert(arguments === 3.1);
|
||||
}
|
||||
f20(3.1);
|
||||
|
||||
function f21 (arguments, a = arguments) {
|
||||
assert(a === 3.1);
|
||||
assert(arguments === 3.1);
|
||||
}
|
||||
f21(3.1);
|
||||
|
||||
function f22 (arguments, [a = arguments]) {
|
||||
assert(a === 3.1);
|
||||
assert(arguments === 3.1);
|
||||
}
|
||||
f22(3.1, []);
|
||||
|
||||
Reference in New Issue
Block a user