Invoke put functions

Issue #236
This commit is contained in:
Brian Anderson 2011-09-07 18:41:57 -07:00
parent 5b7145a9f4
commit 118194381c
2 changed files with 13 additions and 1 deletions

View file

@ -4343,7 +4343,7 @@ fn trans_put(in_cx: &@block_ctxt, e: &option::t<@ast::expr>) -> result {
llargs += [r.val];
}
}
FastCall(bcx, llcallee, llargs);
bcx = invoke_fastcall(bcx, llcallee, llargs).bcx;
bcx = trans_block_cleanups(bcx, cx);
let next_cx = new_sub_block_ctxt(in_cx, "next");
Br(bcx, next_cx.llbb);

View file

@ -0,0 +1,12 @@
// error-pattern:fail
iter x() -> int {
let a = @0;
put 1;
}
fn main() {
for each x in x() {
fail;
}
}