blob: 4ad35c07a06b53d81192157ddb2eb08aec4d19e7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// |jit-test| error:is not a function
var arr = [];
var C = function () {};
C.prototype.dump = function () {};
arr[0] = new C;
C = function () {};
C.prototype.dump = this;
arr[1] = new C;
function f() {
for (var i = 0; i < arr.length; i++)
arr[i].dump();
}
try {
f();
} catch (exc) {
assertEq(exc.message.includes("is not a function"), true);
}
f();
|