Add tests for #2190 (xfailed)

This commit is contained in:
Tim Chevalier 2012-11-15 12:30:04 -08:00
parent 59a034a63f
commit a0610c952f
3 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,14 @@
// xfail-test
const generations: uint = 1024+256+128+49;
fn child_no(x: uint) -> fn~() {
|| {
if x < generations {
task::spawn(child_no(x+1));
}
}
}
fn main() {
task::spawn(child_no(0));
}

View File

@ -0,0 +1,21 @@
// xfail-test
mod a {
fn foo(f: fn&()) { f() }
fn bar() {}
fn main() { foo(||bar()); }
}
mod b {
fn foo(f: Option<fn&()>) { f.iter(|x|x()) }
fn bar() {}
fn main() { foo(Some(bar)); }
}
mod c {
fn foo(f: Option<fn&()>) { f.iter(|x|x()) }
fn bar() {}
fn main() { foo(Some(||bar())); }
}
fn main() {
}

View File

@ -0,0 +1,8 @@
// xfail-test
type t = {
f: fn~()
};
fn main() {
let _t: t = { f: {||()} };
}