rust/src/test/run-pass/fun-indirect-call.rs
2012-08-01 19:16:06 -07:00

12 lines
142 B
Rust

// -*- rust -*-
fn f() -> int { return 42; }
fn main() {
let g: extern fn() -> int = f;
let i: int = g();
assert (i == 42);
}