2012-02-24 17:46:13 -08:00
|
|
|
// xfail-win32
|
|
|
|
fn adder(+x: @int, +y: @int) -> int { ret *x + *y; }
|
|
|
|
fn failer() -> @int { fail; }
|
|
|
|
fn main() {
|
2012-06-30 16:19:07 -07:00
|
|
|
assert(result::is_err(task::try(|| {
|
2012-02-24 17:46:13 -08:00
|
|
|
adder(@2, failer()); ()
|
2012-06-26 13:55:56 -07:00
|
|
|
})));
|
2012-02-24 17:46:13 -08:00
|
|
|
}
|
|
|
|
|