blob: 9afb3b4333f90b518eb010ec5f52fb980422688f [file] [log] [blame]
// Constructing calls must throw if !callee->isInterpretedConstructor().
[0].some(Function.prototype)
function f() {
new Function.prototype
}
function g() {
var count = 0;
for (var i=0; i<3; i++) {
try {
f();
} catch (e) {
assertEq(e.message.includes("is not a constructor"), true);
count++;
}
}
assertEq(count, 3);
}
g();