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



// -*- rust -*-
enum clam<T> { a(T, int), b, }

fn uhoh<T>(v: ~[clam<T>]) {
    alt v[1] {
      a::<T>(t, u) { #debug("incorrect"); log(debug, u); fail; }
      b::<T> { #debug("correct"); }
    }
}

fn main() {
    let v: ~[clam<int>] = ~[b::<int>, b::<int>, a::<int>(42, 17)];
    uhoh::<int>(v);
}