aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/comm.rs
blob: 93ccacfcc2a7700e44ac381066f2455f3779500f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// xfail-stage0
// -*- rust -*-

impure fn main() {
  let port[int] p = port();
  spawn child(chan(p));
  let int y;
  y <- p;
  log "received";
  log y;
  check (y == 10);
}

impure fn child(chan[int] c) {
  c <| 10;
}