rust/src/test/run-pass/size-and-align.rs

17 lines
276 B
Rust
Raw Normal View History

// -*- rust -*-
tag clam[T] { a(T, int); b; }
fn uhoh[T](v: &[clam[T]]) {
2011-07-27 07:19:39 -05:00
alt v.(1) {
a[T](t, u) { log "incorrect"; log u; fail; }
b[T]. { log "correct"; }
}
}
fn main() {
let v: [clam[int]] = ~[b[int], b[int], a[int](42, 17)];
uhoh[int](v);
}