summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testMissingMethod2.js
blob: fabfa08a60f795de8be8468c0461e0db69654d5a (plain)
1
2
3
4
5
6
7
8
9
10
var o = {y: function() {}};
var a = [o, o, o, o, o, o, o, o, o];
Number.prototype.y = 0;
a[7] = 0;
try {
    for (var i = 0; i < 9; i++)
        a[i].y();
} catch (exc) {
    assertEq(exc.name, "TypeError"); // should happen when i == 7
}