rust/src/test/run-pass/fun-indirect-call.rs
2010-06-23 21:03:09 -07:00

12 lines
122 B
Rust

// -*- rust -*-
fn f() -> int {
ret 42;
}
fn main() {
let fn() -> int g = f;
let int i = g();
check(i == 42);
}