mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 16:18:52 +00:00
Fix bug caused by incorrect assert
This commit is contained in:
@@ -4171,7 +4171,7 @@ gb_internal lbAddr lb_build_addr_compound_lit(lbProcedure *p, Ast *expr) {
|
|||||||
|
|
||||||
// HACK TODO(bill): THIS IS A MASSIVE HACK!!!!
|
// HACK TODO(bill): THIS IS A MASSIVE HACK!!!!
|
||||||
if (is_type_union(ft) && !are_types_identical(fet, ft) && !is_type_untyped(fet)) {
|
if (is_type_union(ft) && !are_types_identical(fet, ft) && !is_type_untyped(fet)) {
|
||||||
GB_ASSERT_MSG(union_variant_index(ft, fet) > 0, "%s", type_to_string(fet));
|
GB_ASSERT_MSG(union_variant_index(ft, fet) >= 0, "%s", type_to_string(fet));
|
||||||
|
|
||||||
lb_emit_store_union_variant(p, gep, field_expr, fet);
|
lb_emit_store_union_variant(p, gep, field_expr, fet);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user