few more hoist over fixes
This commit is contained in:
parent
3938d74bb6
commit
d1c784ed49
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue