blob: cb050d13b35c3548d14f24da4bce90a20c82e77b [file] [log] [blame]
function check(expected, ...rest) {
assertEq(expected.toString(), rest.toString());
}
assertEq(check.length, 1);
check([]);
check(['a', 'b'], 'a', 'b');
check(['a', 'b', 'c', 'd'], 'a', 'b', 'c', 'd');
check.apply(null, [['a', 'b'], 'a', 'b'])
check.call(null, ['a', 'b'], 'a', 'b')
var g = newGlobal();
g.eval("function f(...rest) { return rest; }");
var a = g.f(1, 2, 3);
assertEq(a instanceof g.Array, true);