Skip to content

Truly independent web browser

LibJS: Make the JIT IR test of default and rest parameters strict

Jelle Raaijmakers191b942b2c22
diff --git a/Tests/LibJS/JIT/ir/default-and-rest-parameters.js b/Tests/LibJS/JIT/ir/default-and-rest-parameters.js
index a74e61eed63..bc2cbfc952d 100644
--- a/Tests/LibJS/JIT/ir/default-and-rest-parameters.js
+++ b/Tests/LibJS/JIT/ir/default-and-rest-parameters.js
@@ -1,5 +1,8 @@
// A default parameter value is stored to its argument slot for the rest parameter's slow path, which reads the
// frame. The frame is initialized right before that slow path, after the store: it leaves the arguments as they are.
+// The script is strict: functions with a legacy `arguments` property store the value where they assign it instead.
+
+"use strict";
function withDefault(a, b = a + 1, ...rest) {
return a + b + rest.length;