rust/src/test/run-pass/decl-with-recv.rs
2011-07-27 15:54:33 +02:00

16 lines
223 B
Rust

// -*- rust -*-
fn main() {
let po: port[int] = port();
let ch: chan[int] = chan(po);
ch <| 10;
let i: int;
po |> i;
assert (i == 10);
ch <| 11;
let j;
po |> j;
assert (j == 11);
}