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() {
|
2012-01-11 11:58:05 -06:00
|
|
|
type t = native fn() -> int;
|
2011-06-15 13:19:50 -05:00
|
|
|
fn ten() -> int { ret 10; }
|
2011-07-27 07:19:39 -05:00
|
|
|
let rs: t = { ten };
|
2011-06-25 10:45:49 -05:00
|
|
|
assert (rs() == 10);
|
2011-04-07 21:12:55 -05:00
|
|
|
}
|
|
|
|
|
2011-08-19 17:16:48 -05:00
|
|
|
fn main() { test_fn(); }
|