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);