rust/src/test/run-pass/bind-interior.rs
2011-07-27 15:54:33 +02:00

11 lines
146 B
Rust

// -*- rust -*-
fn f(n: int) -> int { ret n; }
fn main() {
let g: fn() -> int = bind f(10);
let i: int = g();
assert (i == 10);
}