Fix lb_store_type_case_implicit

This commit is contained in:
gingerBill
2024-07-04 13:20:36 +01:00
parent 52c219690a
commit d78ff0be52

View File

@@ -1579,7 +1579,8 @@ gb_internal void lb_store_type_case_implicit(lbProcedure *p, Ast *clause, lbValu
lb_addr_store(p, x, value);
} else {
if (!is_default_case) {
GB_ASSERT_MSG(are_types_identical(e->type, type_deref(value.type)), "%s %s", type_to_string(e->type), type_to_string(value.type));
Type *clause_type = e->type;
GB_ASSERT_MSG(are_types_identical(type_deref(clause_type), type_deref(value.type)), "%s %s", type_to_string(clause_type), type_to_string(value.type));
}
lb_add_entity(p->module, e, value);
}