File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -2134,28 +2134,23 @@ fn check_expr(&@stmt_ctxt scx, &@ast::expr expr) {
2134
2134
cond) ;
2135
2135
2136
2136
check_block( scx, thn) ;
2137
- auto thn_t = block_ty( scx. fcx. ccx. tcx, thn) ;
2138
2137
2139
- auto if_t;
2140
- alt ( elsopt) {
2138
+ auto if_t = alt ( elsopt) {
2141
2139
case ( some[ @ast:: expr] ( ?els) ) {
2142
2140
check_expr( scx, els) ;
2141
+
2142
+ auto thn_t = block_ty( scx. fcx. ccx. tcx, thn) ;
2143
2143
auto elsopt_t = expr_ty( scx. fcx. ccx. tcx, els) ;
2144
2144
if ( !ty:: type_is_bot( scx. fcx. ccx. tcx, elsopt_t) ) {
2145
- Pushdown :: pushdown_expr( scx, thn_t, els) ;
2146
- if_t = elsopt_t;
2145
+ elsopt_t
2147
2146
} else {
2148
- if_t = thn_t;
2147
+ thn_t
2149
2148
}
2150
2149
}
2151
2150
case ( none[ @ast:: expr] ) {
2152
- if_t = ty:: mk_nil( scx. fcx. ccx. tcx) ;
2151
+ ty:: mk_nil( scx. fcx. ccx. tcx)
2153
2152
}
2154
- }
2155
-
2156
- if ( !ty:: type_is_bot( scx. fcx. ccx. tcx, thn_t) ) {
2157
- Pushdown :: pushdown_block( scx, if_t, thn) ;
2158
- }
2153
+ } ;
2159
2154
2160
2155
write:: ty_only_fixup( scx, a. id, if_t) ;
2161
2156
}
You can’t perform that action at this time.
0 commit comments