diff --git a/src/test/run-pass/issue-2190-1.rs b/src/test/run-pass/issue-2190-1.rs new file mode 100644 index 00000000000..144b6e182f2 --- /dev/null +++ b/src/test/run-pass/issue-2190-1.rs @@ -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)); +} diff --git a/src/test/run-pass/issue-2190-2.rs b/src/test/run-pass/issue-2190-2.rs new file mode 100644 index 00000000000..d3a5f2bd9c9 --- /dev/null +++ b/src/test/run-pass/issue-2190-2.rs @@ -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) { f.iter(|x|x()) } +fn bar() {} +fn main() { foo(Some(bar)); } +} + +mod c { +fn foo(f: Option) { f.iter(|x|x()) } +fn bar() {} +fn main() { foo(Some(||bar())); } +} + +fn main() { +} \ No newline at end of file diff --git a/src/test/run-pass/issue-2190.rs b/src/test/run-pass/issue-2190.rs new file mode 100644 index 00000000000..aba2474556f --- /dev/null +++ b/src/test/run-pass/issue-2190.rs @@ -0,0 +1,8 @@ +// xfail-test +type t = { + f: fn~() +}; + +fn main() { + let _t: t = { f: {||()} }; +}