2011-09-24 23:20:36 -05:00
|
|
|
|
2011-09-23 16:58:06 -05:00
|
|
|
type foo = {a: int, b: uint};
|
2012-01-19 20:31:08 -06:00
|
|
|
enum bar { u(~foo), w(int), }
|
2011-09-23 16:58:06 -05:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
assert (alt u(~{a: 10, b: 40u}) {
|
|
|
|
u(~{a: a, b: b}) { a + (b as int) }
|
|
|
|
_ { 66 }
|
|
|
|
} == 50);
|
|
|
|
}
|