michael@0: function f() { michael@0: var a = []; michael@0: for (var i = 0; i < 1000; i++) { michael@0: a.x = {} michael@0: } michael@0: a[i][0] = 0; michael@0: } michael@0: michael@0: var e; michael@0: try { michael@0: f(); michael@0: } catch (error) {e = error;} michael@0: assertEq(e.toString(), 'TypeError: a[i] is undefined');