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