]> Nishi Git Mirror - gwion.git/commitdiff
:art: Update
authorfennecdjay <astor.jeremie@wanadoo.fr>
Sun, 3 Nov 2019 23:02:37 +0000 (00:02 +0100)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Sun, 3 Nov 2019 23:02:37 +0000 (00:02 +0100)
src/import/tdef.c
tests/import/typedef_tmpl.c

index 100ee8250e232924163a89772713a5507a4b10e9..8f235f581ab43f45497ae67ccab67ede0de0a62d 100644 (file)
@@ -34,10 +34,10 @@ ANN Type gwi_typedef_end(const Gwi gwi, const ae_flag flag) {
   Type_Decl *td = gwi->ck->td;
   td->flag |= flag;
   const Type_Def tdef = new_type_def(gwi->gwion->mp, td, gwi->ck->sym);
-  gwi->ck->td = NULL;
-  if(td->types)
+  if(gwi->ck->tmpl)
     tdef->tmpl = new_tmpl(gwi->gwion->mp, gwi->ck->tmpl, -1);
-  tdef->tmpl = NULL;
+  gwi->ck->td = NULL;
+  gwi->ck->tmpl = NULL;
   const m_bool ret = traverse_type_def(gwi->gwion->env, tdef);
   const Type t = tdef->type;
   free_type_def(gwi->gwion->mp, tdef);
index b3ec7251d8876992bbc0d20a205dbc363d541605..d02013192fbfdbd39b5b805f080e311b14abe094 100644 (file)
@@ -12,7 +12,7 @@
 #include "import.h"
 
 GWION_IMPORT(typedef_test) {
-  GWI_BB(gwi_typedef_ini(gwi, "int", "Typedef<~A~>"))
+  GWI_BB(gwi_typedef_ini(gwi, "Ptr<~A~>", "Typedef<~A~>"))
   GWI_BB(gwi_typedef_end(gwi, ae_flag_none))
   return GW_OK;
 }