Sign in
webkit
/
WebKit
/
6a59c200745aa2ef26b1e56c44297ddf7c28ff78
/
.
/
JSTests
/
es6
/
proper_tail_calls_tail_call_optimisation_direct_recursion.js
blob: f5d20ac84fd1b67b1364c7977a04bacf2b4345fa [
file
] [
log
] [
blame
]
function
test
()
{
"use strict"
;
return
(
function
f
(
n
){
if
(
n
<=
0
)
{
return
"foo"
;
}
return
f
(
n
-
1
);
}(
1e6
))
===
"foo"
;
}
if
(!
test
())
throw
new
Error
(
"Test failed"
);