Sign in
webkit
/
WebKit
/
b064c65331ee2a78abea97e04a6d4bf79aa61cea
/
.
/
JSTests
/
stress
/
big-int-prototype-to-string-exception.js
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"
);
}