diff options
Diffstat (limited to 'src/check_expr.c')
| -rw-r--r-- | src/check_expr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/check_expr.c b/src/check_expr.c index 24ac6dfc1..5d711afdf 100644 --- a/src/check_expr.c +++ b/src/check_expr.c @@ -601,6 +601,8 @@ void check_union_type(Checker *c, Type *union_type, AstNode *node) { union_type->Record.fields = fields; union_type->Record.field_count = field_count; + union_type->Record.are_offsets_set = false; + for_array(i, ut->variants) { AstNode *variant = ut->variants.e[i]; @@ -668,6 +670,8 @@ void check_union_type(Checker *c, Type *union_type, AstNode *node) { add_entity_use(c, f->name, e); } + type_set_offsets(c->allocator, union_type); + gb_temp_arena_memory_end(tmp); union_type->Record.variants = variants; |