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

12 lines
129 B
Rust
Raw Normal View History

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