diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2011-06-27 16:56:25 -0700 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2011-06-27 18:14:23 -0700 |
| commit | 6d1050b1c7c8f5075aaaf6b922ff36f3aceef5e2 (patch) | |
| tree | 211a3d50d1921cd614de305c954e2c9d2ade788d /src/comp/middle/tstate | |
| parent | a72481f90ba8a7b48e4405c9862d0861032a528a (diff) | |
| download | rust-6d1050b1c7c8f5075aaaf6b922ff36f3aceef5e2.tar.gz rust-6d1050b1c7c8f5075aaaf6b922ff36f3aceef5e2.zip | |
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).
Diffstat (limited to 'src/comp/middle/tstate')
| -rw-r--r-- | src/comp/middle/tstate/auxiliary.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/comp/middle/tstate/auxiliary.rs b/src/comp/middle/tstate/auxiliary.rs index 034a9bd7f7f..13198788141 100644 --- a/src/comp/middle/tstate/auxiliary.rs +++ b/src/comp/middle/tstate/auxiliary.rs @@ -436,8 +436,8 @@ fn set_postcond_false(&crate_ctxt ccx, node_id id) { } fn pure_exp(&crate_ctxt ccx, node_id id, &prestate p) -> bool { - ret extend_prestate_ann(ccx, id, p) | - extend_poststate_ann(ccx, id, p); + ret set_prestate_ann(ccx, id, p) | + set_poststate_ann(ccx, id, p); } fn num_constraints(fn_info m) -> uint { ret m.num_constraints; } |
