few more hoist over fixes

This commit is contained in:
microproofs 2024-02-03 20:16:16 -05:00 committed by Kasey
parent 3938d74bb6
commit d1c784ed49
1 changed files with 2 additions and 2 deletions

View File

@ -889,7 +889,7 @@ impl<'a> CodeGenerator<'a> {
let expr = AirTree::let_assignment(name, value, expect); let expr = AirTree::let_assignment(name, value, expect);
AirTree::assert_bool(true, expr, props.msg_func.clone()) AirTree::assert_bool(true, expr, props.msg_func.clone()).hoist_over(then)
} }
Pattern::Var { name, .. } => { Pattern::Var { name, .. } => {
@ -1095,7 +1095,7 @@ impl<'a> CodeGenerator<'a> {
if tipo.is_bool() { if tipo.is_bool() {
assert!(props.kind.is_expect()); assert!(props.kind.is_expect());
AirTree::assert_bool(name == "True", value, props.msg_func) AirTree::assert_bool(name == "True", value, props.msg_func).hoist_over(then)
} else if tipo.is_void() { } else if tipo.is_void() {
AirTree::let_assignment("_", value, then) AirTree::let_assignment("_", value, then)
} else { } else {