summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testCallElem.js
blob: b40553edc1c23e49a4d5f7befdc384c82f10dc2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function testCALLELEM()
{
    function f() {
        return 5;
    }

    function g() {
        return 7;
    }

    var x = [f,f,f,f,g];
    var y = 0;
    for (var i = 0; i < 5; ++i)
        y = x[i]();
    return y;
}
assertEq(testCALLELEM(), 7);