summary refs log tree commit diff
path: root/src/test/run-pass/deep.rs
blob: ca84abc5f600fd84042d0e5fc71578657ae84178 (plain)
1
2
3
4
5
6
7
8
9



// -*- rust -*-
fn f(x: int) -> int {
    if x == 1 { return 1; } else { let y: int = 1 + f(x - 1); return y; }
}

fn main() { assert (f(5000) == 5000); }