rust/src/test/run-pass/nested-alts.rs

18 lines
282 B
Rust
Raw Normal View History

use std;
import std::option::*;
fn baz() -> ! { fail; }
fn foo() {
2011-07-27 07:19:39 -05:00
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(); }