aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.c
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-04-18 21:20:41 +0100
committerGinger Bill <bill@gingerbill.org>2017-04-18 21:20:41 +0100
commit95692fda52320b6f6128d75f08ae5ac0e17c4857 (patch)
tree988823875fcf386b7f41b0c25087cbbdf6c67a30 /src/check_expr.c
parent813a028ed0c8b3387436d959b4faa924117edab2 (diff)
Fix bug with union literal checking crashing the compiler
Diffstat (limited to 'src/check_expr.c')
-rw-r--r--src/check_expr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/check_expr.c b/src/check_expr.c
index a60193dae..c10eb7bd7 100644
--- a/src/check_expr.c
+++ b/src/check_expr.c
@@ -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) {