From 336949a5908c27759b3bce0bb6678860d63eb047 Mon Sep 17 00:00:00 2001 From: Lindsey Kuper Date: Wed, 20 Jul 2011 15:19:22 -0700 Subject: [PATCH] Test case for issue #718. --- src/test/run-pass/issue-718.rs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/test/run-pass/issue-718.rs diff --git a/src/test/run-pass/issue-718.rs b/src/test/run-pass/issue-718.rs new file mode 100644 index 00000000000..0ace439f816 --- /dev/null +++ b/src/test/run-pass/issue-718.rs @@ -0,0 +1,27 @@ +//xfail-stage0 +//xfail-stage1 +//xfail-stage2 + +fn main() { + + obj a() { + fn foo() -> int { + ret 2; + } + } + + auto my_a = a(); + + auto my_b = obj() { + with my_a + }; + + assert (my_b.foo() == 2); + + auto my_c = obj() { + with my_b + }; + + assert (my_c.foo() == 2); +} +