mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-24 14:45:00 -07:00
Add parse_int; Fix union bugs with size, alignment, and recursive definition checking
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user