summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug827104.js
blob: a4ae50201fd1f0242fbab88e04bfaa5f32d32024 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function f() {
    var a = [];
    for (var i = 0; i < 1000; i++) {
      a.x = {}
    }
    a[i][0] = 0;
}

var e;
try {
    f();
} catch (error) {e = error;}
assertEq(e.constructor.name, "TypeError");
assertEq(e.message.includes("a[i] is undefined"), true);