rust/src/test/run-pass/use-uninit-alt.rs
2011-08-16 15:05:57 -07:00

12 lines
183 B
Rust

fn foo<T>(o: &myoption<T>) -> int {
let x: int = 5;
alt o { none::<T>. { } some::<T>(t) { x += 1; } }
ret x;
}
tag myoption<T> { none; some(T); }
fn main() { log 5; }