ref: 8a3e8add6e0180565312d1079395ad39de4d9ce3
parent: 3355f31cb1efe35fab21e39e27c5cadcda93d51d
author: Ori Bernstein <ori@eigenstate.org>
date: Wed Jul 18 18:17:59 EDT 2018
Top level anonymous unions may not have their type set.
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -514,7 +514,8 @@
case Tyunion:
inaggr++;
for (i = 0; i < t->nmemb; i++) {
- assert(t->udecls[i]->utype);
+ if (!t->udecls[i]->utype)
+ t->udecls[i]->utype = t;
t->udecls[i]->utype = tf(t->udecls[i]->utype);
if (t->udecls[i]->etype) {
tyresolve(t->udecls[i]->etype);