about summary refs log tree commit diff
path: root/src/test/run-pass/nested-alts.rs
blob: 9ca73209f36ce802995ef38fc892c3d96455f6e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

use std;
import 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(); }