summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug630865-6.js
blob: 0532101bd0f524e4cb92573d6292ecd4437b3470 (plain)
1
2
3
4
5
6
7
8
9
10
11
var a = [];
var x, i;
for (i = 0; i < 18; i++) {
    a[i] = function (b) { this.b = b; };
    if (i != 17)
        x = a[i].prototype;
}
for (i = 0; i < 18; i++)
    x = new a[i];
assertEq(toString.call(x), "[object Object]");
assertEq(Object.getPrototypeOf(x), a[17].prototype);