summary refs log tree commit diff
path: root/src/test/run-pass/expr-block-fn.rs
blob: 19be1e81b666c640e6dcf96cd9172d56576797b7 (plain)
1
2
3
4
5
6
7
8
9
10


fn test_fn() {
    type t = native fn() -> int;
    fn ten() -> int { ret 10; }
    let rs: t = { ten };
    assert (rs() == 10);
}

fn main() { test_fn(); }