summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testMethodInit.js
blob: 64cfa4c37c50576973f3ffb4fc3228ad9a5b4546 (plain)
1
2
3
4
5
6
7
8
9
10
function testMethodInit() {  // bug 503198
    function o() { return 'o'; }
    function k() { return 'k'; }

    var x;
    for (var i = 0; i < 10; i++)
        x = {o: o, k: k};
    return x.o() + x.k();
}
assertEq(testMethodInit(), "ok");