rust/src/test/run-pass/unique-pat-2.rs
Brian Anderson 389852b5c0 Fix tags of unique boxes
Issue #409
2011-09-26 14:44:08 -07:00

11 lines
208 B
Rust

type foo = {a: int, b: uint};
tag bar { u(~foo); w(int); }
fn main() {
assert (alt u(~{a: 10, b: 40u}) {
u(~{a: a, b: b}) { a + (b as int) }
_ { 66 }
} == 50);
}