2019-07-26 16:54:25 -05:00
|
|
|
// run-pass
|
2018-03-16 13:42:42 -05:00
|
|
|
// ignore-emscripten apparently blows the stack
|
2015-03-22 15:13:15 -05:00
|
|
|
|
2015-03-25 19:06:52 -05:00
|
|
|
fn f(x: isize) -> isize {
|
|
|
|
if x == 1 { return 1; } else { let y: isize = 1 + f(x - 1); return y; }
|
2010-06-23 23:03:09 -05:00
|
|
|
}
|
|
|
|
|
2015-06-07 13:00:38 -05:00
|
|
|
pub fn main() { assert_eq!(f(5000), 5000); }
|