blob: b98650a61adbe707461522850062650633fa2c98 (
plain)
1
2
3
4
5
6
7
|
// Rest parameters work in arrow functions
load(libdir + "asserts.js");
var f = (a, b, ...rest) => [a, b, rest];
assertDeepEq(f(), [(void 0), (void 0), []]);
assertDeepEq(f(1, 2, 3, 4), [1, 2, [3, 4]]);
|