Skip to content

Commit 6d1050b

Browse files
committed
pure_exp should set the state, not extend it
This fixes a bug where de-initializations were getting masked (and programs that used a variable that had been de-initialized snuck through).
1 parent a72481f commit 6d1050b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/comp/middle/tstate/auxiliary.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,8 +436,8 @@ fn set_postcond_false(&crate_ctxt ccx, node_id id) {
436436
}
437437

438438
fn pure_exp(&crate_ctxt ccx, node_id id, &prestate p) -> bool {
439-
ret extend_prestate_ann(ccx, id, p) |
440-
extend_poststate_ann(ccx, id, p);
439+
ret set_prestate_ann(ccx, id, p) |
440+
set_poststate_ann(ccx, id, p);
441441
}
442442

443443
fn num_constraints(fn_info m) -> uint { ret m.num_constraints; }

0 commit comments

Comments
 (0)