From a294d738c7ff160124519f988f37baafcfa48a3b Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Mon, 21 Oct 2019 18:07:14 +0200 Subject: [PATCH] :art: tests and fixes --- src/lib/import.c | 1 + tests/import/class_template.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/import.c b/src/lib/import.c index 27285ac7..5d340067 100644 --- a/src/lib/import.c +++ b/src/lib/import.c @@ -164,6 +164,7 @@ ANN static m_bool _tmpl_valid(const Gwion gwion, struct tmpl_checker *ck) { if(s[i] == ',') { if(!i)break; c[i] = '\0'; + ck->list = new_id_list(gwion->mp, insert_symbol(gwion->st, c), ck->pos); struct tmpl_checker _ck = { .str=ck->str + i + 1, .pos=ck->pos }; CHECK_BB(_tmpl_valid(gwion, &_ck)) ck->list->next = _ck.list; diff --git a/tests/import/class_template.c b/tests/import/class_template.c index e532daa5..92309b6b 100644 --- a/tests/import/class_template.c +++ b/tests/import/class_template.c @@ -38,8 +38,10 @@ GWION_IMPORT(class_template) { GWI_BB((o_map_key = gwi_item_end(gwi, ae_flag_member | ae_flag_template, NULL))) GWI_BB(gwi_item_ini(gwi, "B[]", "value")) GWI_BB((o_map_value = gwi_item_end(gwi, ae_flag_member, NULL))) - GWI_BB(gwi_class_end(gwi)) + GWI_BB(gwi_func_ini(gwi, "int", "<~C,D~>test", (f_xfun)1)) + GWI_BB(gwi_func_end(gwi, ae_flag_none)) + GWI_BB(gwi_class_end(gwi)) GWI_BB(gwi_item_ini(gwi, "ClassTemplate<~Ptr<~int~>,int[]~>", "testObject")) GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL)) return GW_OK; -- 2.43.0