rust/src/test/run-pass/fun-indirect-call.rs

7 lines
118 B
Rust

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