rust/src/test/run-pass/block-fn-coerce.rs
Marijn Haverbeke fc6b7c8b38 Reformat for new mode syntax, step 1
Long lines were fixed in a very crude way, as I'll be following up
with another reformat in a bit.
2011-09-12 12:04:14 +02:00

8 lines
176 B
Rust

fn force(f: block() -> int) -> int { ret f(); }
fn main() {
let f = fn () -> int { ret 7 };
assert (force(f) == 7);
let g = bind force(f);
assert (g() == 7);
}