summary refs log tree commit diff
path: root/src/test/run-pass/unique-pat-2.rs
blob: 169ce721de72c28ea7a2f2ab423e1fc00c4c4cf3 (plain)
1
2
3
4
5
6
7
8
9
10

type foo = {a: int, b: uint};
enum 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);
}