rust/src/test/run-pass/box-pattern.rs
Brian Anderson 518dc52f85 Reformat
This changes the indexing syntax from .() to [], the vector syntax from ~[] to
[] and the extension syntax from #fmt() to #fmt[]
2011-08-20 11:04:00 -07:00

10 lines
207 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);
}