fix: expect true was always expecting false

This commit is contained in:
Kasey White
2023-04-03 15:20:33 -04:00
committed by Kasey
parent ddf0fbfa0a
commit 8c8312a412
2 changed files with 10 additions and 4 deletions

View File

@@ -1858,7 +1858,7 @@ impl<'a> CodeGenerator<'a> {
}
AssignmentKind::Expect => {
if tipo.is_bool() {
expect_stack.expect_bool(constr_name == "True", value_stack);
expect_stack.expect_bool(constructor_name == "True", value_stack);
} else if tipo.is_void() {
expect_stack.choose_unit(value_stack);
} else if tipo.is_data() {
@@ -2322,8 +2322,6 @@ impl<'a> CodeGenerator<'a> {
let new_id = self.id_gen.next();
// START HERE
let mut clause_stack = expect_stack.empty_with_scope();
let mut when_stack = expect_stack.empty_with_scope();
let mut trace_stack = expect_stack.empty_with_scope();