Sign in
webkit
/
WebKit
/
62c15071e892ba610c3477e054612dec44c8d322
/
.
/
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"
);
}