diff options
Diffstat (limited to 'js/src/jit-test/tests/arguments/rest-underflow.js')
-rw-r--r-- | js/src/jit-test/tests/arguments/rest-underflow.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/arguments/rest-underflow.js b/js/src/jit-test/tests/arguments/rest-underflow.js new file mode 100644 index 0000000000..bb9b39c50b --- /dev/null +++ b/js/src/jit-test/tests/arguments/rest-underflow.js @@ -0,0 +1,9 @@ +function f(a, b, c, ...rest) { + assertEq(a, 1); + assertEq(b, undefined); + assertEq(c, undefined); + assertEq(Array.isArray(rest), true); + assertEq(rest.length, 0); + assertEq(Object.getPrototypeOf(rest), Array.prototype); +} +f(1); |