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

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