blob: 6c1d3c03359faf628d7d4500c773737b8ccd2527 [file] [log] [blame]
//@ runBigIntEnabled
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");
}