rust/src/test/run-pass/call-closure-from-overloaded-op.rs

9 lines
134 B
Rust
Raw Normal View History

use dvec::DVec;
fn foo() -> int { 22 }
fn main() {
let x = DVec::<@fn() -> int>();
x.push(foo);
assert (x[0])() == 22;
}