blob: 6ca70de9af5c4dea702f5a4d5daf6f2fb6f0f38b [file] [log] [blame]
function assert(a) {
if (!a)
throw new Error("Bad assertion");
}
let o = {
valueOf: () => {
throw new Error("Bad");
return 2;
}
}
let a = 20n;
try {
a.toString(o);
assert(false);
} catch (e) {
assert(e.message == "Bad");
}