michael@0: // |jit-test| error:is not a function michael@0: var arr = []; michael@0: michael@0: var C = function () {}; michael@0: C.prototype.dump = function () {}; michael@0: arr[0] = new C; michael@0: michael@0: C = function () {}; michael@0: C.prototype.dump = this; michael@0: arr[1] = new C; michael@0: michael@0: function f() { michael@0: for (var i = 0; i < arr.length; i++) michael@0: arr[i].dump(); michael@0: } michael@0: michael@0: try { michael@0: f(); michael@0: } catch (exc) { michael@0: assertEq(exc.message.contains("is not a function"), true); michael@0: } michael@0: f();