summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testBug586866.js
blob: 425bf2b782458e336ebd921d2107fb168ba347fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
var magic = 8;

var obj = {};
for (var i = 1; i <= magic; ++i)
    obj[i] = "a";

function func() {
    var i = 1;
    while (i in obj) {
        ++i;
    }
    return i - 1;
}
assertEq(func(), magic);
assertEq(func(), magic);
assertEq(func(), magic);