rust/src/test/run-pass/issue-3121.rs

19 lines
391 B
Rust
Raw Normal View History

2012-11-01 16:43:26 -05:00
// xfail-test
enum side { mayo, catsup, vinegar }
enum order { hamburger, fries(side), shake }
enum meal { to_go(order), for_here(order) }
fn foo(m: @meal, cond: bool) {
match *m {
to_go(_) => { }
for_here(_) if cond => {}
for_here(hamburger) => {}
for_here(fries(_s)) => {}
for_here(shake) => {}
}
}
fn main() {
foo(@for_here(hamburger), true)
}