rust/src/test/run-pass/nested-alts.rs
2011-08-16 15:05:57 -07:00

19 lines
293 B
Rust

use std;
import std::option::*;
fn baz() -> ! { fail; }
fn foo() {
alt some::<int>(5) {
some::<int>(x) {
let bar;
alt none::<int> { none::<int>. { bar = 5; } _ { baz(); } }
log bar;
}
none::<int>. { log "hello"; }
}
}
fn main() { foo(); }