]> Nishi Git Mirror - gwion.git/commitdiff
:art: Use nspc for simple typedef
authorfennecdjay <astor.jeremie@wanadoo.fr>
Tue, 16 Jul 2019 02:45:26 +0000 (04:45 +0200)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Tue, 16 Jul 2019 02:45:26 +0000 (04:45 +0200)
src/parse/scan0.c

index ea5fbbed81dfb37ad7e21332ade58b9f17af6cfb..a1cc966bb8332cd73e503784656c3da5fa8ad955 100644 (file)
@@ -73,6 +73,8 @@ ANN static void typedef_simple(const Env env, const Stmt_Type stmt, const Type b
   add_type(env, nspc, t);
   t->e->owner = nspc;
   stmt->type = t;
+  if(base->nspc)
+    ADD_REF((t->nspc = base->nspc));
   t->flag = stmt->ext->flag | ae_flag_checked;
   if(stmt->ext->array && !stmt->ext->array->exp)
     SET_FLAG(t, empty);