summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arrow-functions/params-rest-2.js
blob: 6668a0aad78688623568a464ebb1adc3a678f761 (plain)
1
2
3
4
5
// Rest parameters work in arrow functions

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