2011-09-20 11:59:25 -07:00
|
|
|
// error-pattern:goodfail
|
|
|
|
|
|
|
|
use std;
|
2011-12-13 16:25:51 -08:00
|
|
|
import task;
|
|
|
|
import comm;
|
2011-09-20 11:59:25 -07:00
|
|
|
|
2011-10-20 20:34:04 -07:00
|
|
|
fn goodfail(&&_i: ()) {
|
2011-09-20 11:59:25 -07:00
|
|
|
task::yield();
|
|
|
|
fail "goodfail";
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2011-10-13 21:23:07 -07:00
|
|
|
task::spawn((), 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";
|
|
|
|
}
|