blob: 23e7bb4503083bf469d540c8f3d1f6e81a7fc5c5 [file] [log] [blame]
function assert(b) {
if (!b)
throw new Error("Bad");
}
{
let error;
try {
let foo = {};
foo.bar("/abc\)*/");
} catch(e) {
error = e;
}
assert(error);
assert(error.message === "undefined is not a function (near '...foo.bar(\"/abc\\)*/\")...')");
}
{
let error;
try {
let blah = {};
let x, y;
blah("(((");
} catch(e) {
error = e;
}
// This is less than ideal, but let's be aware if we ever fix it.
assert(error.message === "blah(\"(( is not a function. (In 'blah(\"(((\")', 'blah(\"((' is an instance of Object)");
}