summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arguments/spread-args-obj-03.js
blob: 702884272aa03efbe9c1c64304bfd5b3b6fdd000 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
function escape() { with ({}) {} }

function foo(i) {
    return i;
}

function bar(n) {
    escape(arguments);
    return foo(...arguments);
}

function baz(a, n) {
    return bar(n);
}

var sum = 0;
for (var i = 0; i < 10000; i++) {
    sum += baz(0, 1);
}
assertEq(sum, 10000);