blob: cf19630146f6b14bef50e2fd5ae577f320d1c58f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// a bug was causing this to complain about leaked memory on exit
use std;
import option;
import option::some;
import option::none;
tag t { foo(int, uint); bar(int, option::t<int>); }
fn nested(o: t) {
alt o {
bar(i, some::<int>(_)) { log_err "wrong pattern matched"; fail; }
_ { log_err "succeeded"; }
}
}
fn main() { nested(bar(1, none::<int>)); }
|