aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/fun-indirect-call.rs
blob: 10c2cf40505504b43815d84c4e4a176ed2917d0d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
// -*- rust -*-

fn f() -> int {
  ret 42;
}

fn main() {
  let fn() -> int g = f;
  let int i = g();
  check(i == 42);
}