rustc: Check iter return types. Closes #638.

This commit is contained in:
Patrick Walton 2011-07-07 19:08:59 -07:00
parent 2255eda625
commit 7ed556cf8e

View File

@ -1750,6 +1750,8 @@ fn check_expr(&@fn_ctxt fcx, &@ast::expr expr) {
}
case (some(?e)) {
check_expr(fcx, e);
demand::simple(fcx, expr.span, fcx.ret_ty,
expr_ty(fcx.ccx.tcx, e));
write::nil_ty(fcx.ccx.tcx, id);
}
}