summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arguments/rest-alias-function.js
blob: 1dda665210d273dfc75f0fb9a96baaf7c42ca9b3 (plain)
1
2
3
4
5
6
7
8
9
10
function no_defaults(a, ...rest) {
    return rest;
    function rest() { return a; }
}
assertEq(typeof no_defaults(), "function");
function with_defaults(a=42, ...rest) {
    return rest;
    function rest() { return a; }
}
assertEq(typeof with_defaults(), "function");