2011-03-25 14:19:20 -05:00
|
|
|
// xfail-boot
|
|
|
|
// xfail-stage0
|
2011-01-07 00:39:58 -06:00
|
|
|
impure fn start(chan[chan[str]] c) {
|
2010-08-11 17:05:33 -05:00
|
|
|
let port[str] p = port();
|
|
|
|
c <| chan(p);
|
|
|
|
auto a <- p;
|
2010-08-11 18:08:26 -05:00
|
|
|
// auto b <- p; // Never read the second string.
|
2010-08-11 17:05:33 -05:00
|
|
|
}
|
|
|
|
|
2011-01-07 00:39:58 -06:00
|
|
|
impure fn main() {
|
2010-08-11 17:05:33 -05:00
|
|
|
let port[chan[str]] p = port();
|
|
|
|
auto child = spawn "start" start(chan(p));
|
|
|
|
auto c <- p;
|
|
|
|
c <| "A";
|
|
|
|
c <| "B";
|
|
|
|
yield;
|
|
|
|
}
|