summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug524826-2.js
blob: 38e3c272857653efa68cd9abc3fb6ddb0cf320ba (plain)
1
2
3
4
5
6
7
8
9
10
11
var x = 42;

function f() {
    var a = [{}, {}, {}, {}, {}];
    for (var i = 0; i < 5; i++)
        a[i].m = function () {return x};
    for (i = 0; i < 4; i++)
        if (a[i].m == a[i+1].m)
            throw "FAIL!";
}
f();