From 76f5c132bf788960aaa9c61abed6ec6e6718c3d9 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Mon, 4 Nov 2019 00:02:37 +0100 Subject: [PATCH] :art: Update --- src/import/tdef.c | 6 +++--- tests/import/typedef_tmpl.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/import/tdef.c b/src/import/tdef.c index 100ee825..8f235f58 100644 --- a/src/import/tdef.c +++ b/src/import/tdef.c @@ -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); diff --git a/tests/import/typedef_tmpl.c b/tests/import/typedef_tmpl.c index b3ec7251..d0201319 100644 --- a/tests/import/typedef_tmpl.c +++ b/tests/import/typedef_tmpl.c @@ -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; } -- 2.43.0