rust/src/test/run-pass/size-and-align.rs
2012-08-06 15:36:30 -07:00

18 lines
313 B
Rust

// -*- rust -*-
enum clam<T> { a(T, int), b, }
fn uhoh<T>(v: ~[clam<T>]) {
match 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);
}