summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arguments/args-vargc.js
blob: 615323c48ae07fa42621066e2b2cb3f989c1846e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
actual = '';
expected = '1 2,1 2,1 2,1 2,1 2,1 2,1 2,1 2,1 undefined,1 undefined,1 undefined,1 undefined,1 undefined,1 undefined,1 undefined,1 undefined,';

function g(a, b) {
  appendToActual(a + ' ' + b);
}

function f() {
  for (var i = 0; i < 8; ++i) {
    g.apply(this, arguments);
  }
}

f(1, 2);
f(1);


assertEq(actual, expected)