rust/src/test/compile-fail/or-patter-mismatch.rs
Marijn Haverbeke 86ee3454a1 Implement or-patterns in case clauses
You can now say

    expr_move(?dst, ?src) | expr_assign(?dst, ?src) { ... }

to match both expr_move and expr_assign. The names, types, and number
of bound names have to match in all the patterns.

Closes #449.
2011-07-11 11:01:54 +02:00

13 lines
169 B
Rust

// error-pattern: mismatched types
tag blah {
a(int, int, uint);
b(int, int);
}
fn main() {
alt a(1, 1, 2u) {
a(_, ?x, ?y) | b(?x, ?y) { }
}
}