aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/expr-block-fn.rs
blob: a37d1cb0f8d6d308d5fdc3bd7f0df1a011e78c19 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// xfail-boot

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

fn main() {
  test_fn();
}