rust/src/test/run-pass/check-pattern-bound.rs

10 lines
156 B
Rust
Raw Normal View History

use std;
2011-09-02 17:34:58 -05:00
pure fn p(x: int) -> bool { true }
2011-09-02 17:34:58 -05:00
fn f(x: int) : p(x) { }
fn main() {
2011-09-02 17:34:58 -05:00
alt some(5) { some(y) { check (p(y)); f(y); } _ { fail "yuck"; } }
}