rust/src/test/run-pass/use-uninit-alt.rs
2011-07-27 15:54:33 +02:00

11 lines
178 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; }