2011-03-24 19:50:05 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
2011-06-15 13:19:50 -05:00
|
|
|
// -*- rust -*-
|
|
|
|
fn main() {
|
2011-07-27 07:19:39 -05:00
|
|
|
let po: port[int] = port();
|
|
|
|
let ch: chan[int] = chan(po);
|
2011-06-15 13:19:50 -05:00
|
|
|
ch <| 10;
|
2011-07-27 07:19:39 -05:00
|
|
|
let i: int;
|
2011-06-15 13:19:50 -05:00
|
|
|
po |> i;
|
|
|
|
assert (i == 10);
|
|
|
|
ch <| 11;
|
2011-07-27 07:19:39 -05:00
|
|
|
let j;
|
2011-06-15 13:19:50 -05:00
|
|
|
po |> j;
|
|
|
|
assert (j == 11);
|
|
|
|
}
|