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