2011-03-25 14:19:20 -05:00
|
|
|
// xfail-stage0
|
2010-06-23 23:03:09 -05:00
|
|
|
// -*- rust -*-
|
|
|
|
|
2011-04-19 15:35:49 -05:00
|
|
|
fn main() {
|
2010-06-23 23:03:09 -05:00
|
|
|
let port[int] p = port();
|
|
|
|
spawn child(chan(p));
|
|
|
|
let int y;
|
|
|
|
y <- p;
|
|
|
|
log "received";
|
|
|
|
log y;
|
2011-05-02 13:23:07 -05:00
|
|
|
assert (y == 10);
|
2010-06-23 23:03:09 -05:00
|
|
|
}
|
|
|
|
|
2011-04-19 15:35:49 -05:00
|
|
|
fn child(chan[int] c) {
|
2010-06-23 23:03:09 -05:00
|
|
|
c <| 10;
|
|
|
|
}
|
|
|
|
|