diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-04-14 21:47:59 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-04-14 21:47:59 +0100 |
| commit | 23a0a6de4b78bc5447d70cebfd792319ea2b7059 (patch) | |
| tree | f41b0832edbd64d2de80166e72c7c5df2f769774 /src/check_expr.c | |
| parent | 0d2dbee84e937ccf411787f9dda72e541db3fd20 (diff) | |
Add parse_int; Fix union bugs with size, alignment, and recursive definition checking
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; |