rust/src/test/run-pass/bind-trivial.rs

11 lines
147 B
Rust
Raw Normal View History

2010-06-23 23:03:09 -05:00
// -*- rust -*-
fn f(int n) -> int { ret n; }
2010-06-23 23:03:09 -05:00
fn main() {
let fn(int) -> int g = bind f(_);
let int i = g(42);
assert (i == 42);
}