Improve handling of bottom type in alt arms
This commit is contained in:
parent
5cf5f5024d
commit
8d8ff16dfe
1 changed files with 1 additions and 0 deletions
|
|
@ -2000,6 +2000,7 @@ fn check_expr(fcx: &@fn_ctxt, expr: &@ast::expr) -> bool {
|
|||
}
|
||||
}
|
||||
bot |= !arm_non_bot;
|
||||
if !arm_non_bot { result_ty = ty::mk_bot(fcx.ccx.tcx); }
|
||||
write::ty_only_fixup(fcx, id, result_ty);
|
||||
}
|
||||
ast::expr_fn(f) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue