]> Nishi Git Mirror - gwion.git/commitdiff
:bug: mark unions as union in typedefs
authorfennecdjay <fennecdjay@gmail.com>
Tue, 20 Dec 2022 11:02:31 +0000 (12:02 +0100)
committerfennecdjay <fennecdjay@gmail.com>
Tue, 20 Dec 2022 11:02:38 +0000 (12:02 +0100)
src/parse/scan0.c

index d2f2ab7d49336371ddb881040ac8986ec6a89dca..466d4c2015590064e4e8b0b08bcf84cb2a2a7036 100644 (file)
@@ -141,7 +141,8 @@ ANN static void typedef_simple(const Env env, const Type_Def tdef,
   if (tdef->ext->array && !tdef->ext->array->exp) {
     set_tflag(t, tflag_empty);
     SET_FLAG(t, abstract);
-  }
+  } else if(tflag(base, tflag_union))
+    set_tflag(t, tflag_union);
 }
 
 ANN static m_bool typedef_complex(const Env env, const Type_Def tdef,