summary refs log tree commit diff
path: root/src/test/run-pass/deep.rs
blob: 5c3ecd8c22c4a73476de457ec826fa9e6c58a3d3 (plain)
1
2
3
4
5
6
7
// ignore-emscripten apparently blows the stack

fn f(x: isize) -> isize {
    if x == 1 { return 1; } else { let y: isize = 1 + f(x - 1); return y; }
}

pub fn main() { assert_eq!(f(5000), 5000); }