diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index 2c9cbb6d0dc..4f9b554f439 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -4520,6 +4520,7 @@ fn visit_expr(ex: &@ast::expr, e: &env, v: &vt) { ast::expr_ret(_) { true } ast::expr_break. { true } ast::expr_cont. { true } + ast::expr_call(_, _) { true } _ { let ex_ty = ty::expr_ty(e.ccx.tcx, ex); ty::type_is_bot(e.ccx.tcx, ex_ty) diff --git a/src/test/run-fail/unwind-initializer-indirect.rs b/src/test/run-fail/unwind-initializer-indirect.rs new file mode 100644 index 00000000000..726dc3d9040 --- /dev/null +++ b/src/test/run-fail/unwind-initializer-indirect.rs @@ -0,0 +1,7 @@ +// error-pattern:fail + +fn f() -> @int { fail; } + +fn main() { + let a: @int = f(); +} \ No newline at end of file