2011-09-20 11:59:25 -07:00
|
|
|
// error-pattern:goodfail
|
|
|
|
|
|
|
|
use std;
|
|
|
|
import std::task;
|
|
|
|
import std::comm;
|
|
|
|
|
2011-10-13 15:37:07 -07:00
|
|
|
fn# goodfail(&&_i: ()) {
|
2011-09-20 11:59:25 -07:00
|
|
|
task::yield();
|
|
|
|
fail "goodfail";
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2011-10-13 15:37:07 -07:00
|
|
|
task::spawn2((), goodfail);
|
2011-09-20 11:59:25 -07:00
|
|
|
let po = comm::port();
|
|
|
|
// We shouldn't be able to get past this recv since there's no
|
|
|
|
// message available
|
|
|
|
let i: int = comm::recv(po);
|
|
|
|
fail "badfail";
|
|
|
|
}
|