Add tests for #2190 (xfailed)
This commit is contained in:
parent
59a034a63f
commit
a0610c952f
14
src/test/run-pass/issue-2190-1.rs
Normal file
14
src/test/run-pass/issue-2190-1.rs
Normal 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));
|
||||
}
|
21
src/test/run-pass/issue-2190-2.rs
Normal file
21
src/test/run-pass/issue-2190-2.rs
Normal 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() {
|
||||
}
|
8
src/test/run-pass/issue-2190.rs
Normal file
8
src/test/run-pass/issue-2190.rs
Normal file
@ -0,0 +1,8 @@
|
||||
// xfail-test
|
||||
type t = {
|
||||
f: fn~()
|
||||
};
|
||||
|
||||
fn main() {
|
||||
let _t: t = { f: {||()} };
|
||||
}
|
Loading…
Reference in New Issue
Block a user