blob: c0a096cc2c9415fa6c1faecef9e9c2a6aa0df956 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// Issue #53
fn main() {
alt check "test" { "not-test" { fail; } "test" { } _ { fail; } }
enum t { tag1(str), tag2, }
alt tag1("test") {
tag2 { fail; }
tag1("not-test") { fail; }
tag1("test") { }
_ { fail; }
}
let x = alt check "a" { "a" { 1 } "b" { 2 } };
assert (x == 1);
alt check "a" { "a" { } "b" { } }
}
|