From 3b047bad6e1e33e460ead379534bb95829248a6a Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Fri, 22 Apr 2011 02:07:31 +0000 Subject: New minimal test for current stage2 blocker. --- src/test/run-pass/foreach-box-drop.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/test/run-pass/foreach-box-drop.rs (limited to 'src') diff --git a/src/test/run-pass/foreach-box-drop.rs b/src/test/run-pass/foreach-box-drop.rs new file mode 100644 index 00000000..26b2fb7f --- /dev/null +++ b/src/test/run-pass/foreach-box-drop.rs @@ -0,0 +1,17 @@ +// xfail-stage0 + +obj ob[K](K k) { + iter foo() -> @tup(K) { + put @tup(k); + } +} + +fn x(&ob[str] o) { + for each (@tup(str) i in o.foo()) { + } +} + +fn main() { + auto o = ob[str]("hi" + "there"); + x(o); +} -- cgit v1.2.3