Fix bug with union literal checking crashing the compiler

This commit is contained in:
Ginger Bill
2017-04-18 21:20:41 +01:00
parent 813a028ed0
commit 95692fda52
4 changed files with 25 additions and 14 deletions
+4 -3
View File
@@ -599,9 +599,10 @@ void check_union_type(Checker *c, Type *union_type, AstNode *node) {
map_entity_set(&entity_map, hash_string(name), f);
}
union_type->Record.fields = fields;
union_type->Record.field_count = field_count;
union_type->Record.are_offsets_set = false;
union_type->Record.fields = fields;
union_type->Record.fields_in_src_order = fields;
union_type->Record.field_count = field_count;
union_type->Record.are_offsets_set = false;
for_array(i, ut->variants) {