aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/fun-call-variants.rs
blob: 5fa3837e6b3cbc700c820e153bc855047da1a0c7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// -*- rust -*-

fn ho(fn(int) -> int f) -> int {
  let int n = f(3);
  ret n;
}

fn direct(int x) -> int {
  ret x + 1;
}

fn main() {
  let int a = direct(3); // direct
  //let int b = ho(direct); // indirect unbound
  let int c = ho(bind direct(_)); // indirect bound
  //assert (a == b);
  //assert (b == c);
}