Skip to content

Commit 844e2d7

Browse files
committed
Test case for checks on pattern-bound vars
1 parent 26e1cac commit 844e2d7

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
use std;
2+
import std::option::*;
3+
4+
pure fn p(x:int) -> bool { true }
5+
6+
fn f(x:int) : p(x) { }
7+
8+
fn main() {
9+
alt some(5) {
10+
some(y) {
11+
check p(y);
12+
f(y);
13+
}
14+
_ { fail "yuck"; }
15+
}
16+
}

0 commit comments

Comments
 (0)