Sign in
webkit
/
WebKit
/
6ada3cd2e0d9b9e450b5e021e0e5526f55f59df8
/
.
/
JSTests
/
stress
/
string-replace-constant-folding-replacer-not-string.js
blob: 6c44cb33ac1ed6bb7abf13430e9300c248488ee2 [
file
] [
log
] [
blame
]
function
foo
()
{
"foo"
.
replace
(
/f/
g
,
""
);
return
"foo"
.
replace
(
/f/
g
,
42
);
}
noInline
(
foo
);
let result
;
for
(
let i
=
0
;
i
<
10000
;
i
++)
{
result
=
foo
();
if
(
result
!==
"42oo"
)
throw
new
Error
(
"Error: bad result: "
+
result
);
}