summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arguments/rest-arguments-as-parameters.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/arguments/rest-arguments-as-parameters.js')
-rw-r--r--js/src/jit-test/tests/arguments/rest-arguments-as-parameters.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/arguments/rest-arguments-as-parameters.js b/js/src/jit-test/tests/arguments/rest-arguments-as-parameters.js
new file mode 100644
index 0000000000..120b0ce1c0
--- /dev/null
+++ b/js/src/jit-test/tests/arguments/rest-arguments-as-parameters.js
@@ -0,0 +1,9 @@
+function f1(...arguments) {
+ assertEq("1,2,3", arguments.toString());
+}
+f1(1, 2, 3);
+function f2(arguments, ...rest) {
+ assertEq(arguments, 42);
+ assertEq("1,2,3", rest.toString());
+}
+f2(42, 1, 2, 3); \ No newline at end of file