summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arrow-functions/params-default-2.js
blob: 385fc77d76220f73c1e7712548e24418da2dd08f (plain)
1
2
3
4
5
6
// Parameter default values work in arrow functions

var f = (a=1, b=2, ...rest) => [a, b, rest];
assertEq(f().toSource(), "[1, 2, []]");
assertEq(f(0, 0).toSource(), "[0, 0, []]");
assertEq(f(0, 1, 1, 2, 3, 5).toSource(), "[0, 1, [1, 2, 3, 5]]");