summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testFunApplyMadness1.js
blob: dabc41be44e80c2b937d17ababad0ad8b835c573 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
function g() { assertEq(false, true) }
var ct = 0;

function f(b) {
    var a = arguments;
    if (b)
        f(false);
    else
        g = {
            apply:function(x,y) {
                ++ct;
                assertEq(x, null);
                assertEq(typeof y[0], "boolean");
            }
        };
    g.apply(null, a);
}
f(true);
assertEq(ct, 2);