Skip to content

Commit f3365e3

Browse files
committed
---
yaml --- r: 6605 b: refs/heads/master c: d28e0c0 h: refs/heads/master i: 6603: 89812f9 v: v3
1 parent 3faba81 commit f3365e3

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 9656ceac60258c4189c31b402def67039ae17822
2+
refs/heads/master: d28e0c0c0ae329705a063a025b853b292ff033a7

trunk/src/comp/middle/tstate/pre_post_conditions.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,10 @@ fn find_pre_post_expr(fcx: fn_ctxt, e: @expr) {
452452
expr_alt(ex, alts) {
453453
find_pre_post_expr(fcx, ex);
454454
fn do_an_alt(fcx: fn_ctxt, an_alt: arm) -> pre_and_post {
455+
alt an_alt.guard {
456+
some(e) { find_pre_post_expr(fcx, e); }
457+
_ {}
458+
}
455459
find_pre_post_block(fcx, an_alt.body);
456460
ret block_pp(fcx.ccx, an_alt.body);
457461
}

trunk/src/comp/middle/tstate/states.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,12 @@ fn find_pre_post_state_expr(fcx: fn_ctxt, pres: prestate, e: @expr) -> bool {
530530
if vec::len(alts) > 0u {
531531
a_post = false_postcond(num_constrs);
532532
for an_alt: arm in alts {
533+
alt an_alt.guard {
534+
some(e) {
535+
changed |= find_pre_post_state_expr(fcx, e_post, e);
536+
}
537+
_ {}
538+
}
533539
changed |=
534540
find_pre_post_state_block(fcx, e_post, an_alt.body);
535541
intersect(a_post, block_poststate(fcx.ccx, an_alt.body));

0 commit comments

Comments
 (0)