2011-04-07 22:12:55 -04:00
|
|
|
|
2011-06-15 11:19:50 -07:00
|
|
|
|
2011-04-07 22:12:55 -04:00
|
|
|
fn test_fn() {
|
2011-06-15 11:19:50 -07:00
|
|
|
type t = fn() -> int ;
|
|
|
|
|
|
|
|
fn ten() -> int { ret 10; }
|
|
|
|
let t res = { ten };
|
|
|
|
assert (res() == 10);
|
2011-04-07 22:12:55 -04:00
|
|
|
}
|
|
|
|
|
2011-06-15 11:19:50 -07:00
|
|
|
fn main() { test_fn(); }
|