Sign in
webkit
/
WebKit
/
9835eef20e173101c3fa5bd5374bfd45463458f8
/
.
/
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"
);