New minimal test for current stage2 blocker.
This commit is contained in:
parent
540344acb9
commit
3b047bad6e
1 changed files with 17 additions and 0 deletions
17
src/test/run-pass/foreach-box-drop.rs
Normal file
17
src/test/run-pass/foreach-box-drop.rs
Normal file
|
|
@ -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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue