aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/test/run-pass/foreach-box-drop.rs17
1 files changed, 17 insertions, 0 deletions
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);
+}