2011-04-07 21:12:55 -05:00
|
|
|
|
2011-06-15 13:19:50 -05:00
|
|
|
|
2011-04-07 21:12:55 -05:00
|
|
|
fn test_fn() {
|
2011-06-15 13:19:50 -05:00
|
|
|
type t = fn() -> int ;
|
|
|
|
|
|
|
|
fn ten() -> int { ret 10; }
|
2011-06-25 10:45:49 -05:00
|
|
|
let t rs = { ten };
|
|
|
|
assert (rs() == 10);
|
2011-04-07 21:12:55 -05:00
|
|
|
}
|
|
|
|
|
2011-06-15 13:19:50 -05:00
|
|
|
fn main() { test_fn(); }
|