Zero locals that are inited via alt expressions. Closes #945

This commit is contained in:
Brian Anderson 2011-09-20 10:28:16 -07:00
parent e33f116598
commit 870117f44e
2 changed files with 13 additions and 0 deletions

View file

@ -4664,6 +4664,7 @@ fn init_local(bcx: @block_ctxt, local: @ast::local) -> @block_ctxt {
ccx: ccx};
fn visit_expr(ex: @ast::expr, e: env, v: vt<env>) {
let might_not_init = alt ex.node {
ast::expr_alt(_, _) { true }
ast::expr_ret(_) { true }
ast::expr_break. { true }
ast::expr_cont. { true }