From: fennecdjay Date: Mon, 21 Oct 2019 16:07:14 +0000 (+0200) Subject: :art: tests and fixes X-Git-Tag: nightly~2116^2~49 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=a294d738c7ff160124519f988f37baafcfa48a3b;p=gwion.git :art: tests and fixes --- 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;