aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2011-04-22 02:07:31 +0000
committerGraydon Hoare <[email protected]>2011-04-22 02:07:41 +0000
commit3b047bad6e1e33e460ead379534bb95829248a6a (patch)
tree2d60cf659d17f18c19740e758e1e7553488ef6ea /src/test
parentFix the signature of expr_ext (diff)
downloadrust-3b047bad6e1e33e460ead379534bb95829248a6a.tar.xz
rust-3b047bad6e1e33e460ead379534bb95829248a6a.zip
New minimal test for current stage2 blocker.
Diffstat (limited to 'src/test')
-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);
+}