rust/src/test/run-pass/size-and-align.rs
Tim Chevalier 5b028f527f Remove support for the '.' after a nullary tag in a pattern
(Commit also includes lots of changes to remove '.'s that a git
merge messed up, or else it was monkeys.)
2012-01-19 01:04:59 -08:00

18 lines
301 B
Rust

// -*- rust -*-
tag 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);
}