]> Nishi Git Mirror - gwion.git/commitdiff
:art: tests and fixes
authorfennecdjay <astor.jeremie@wanadoo.fr>
Mon, 21 Oct 2019 16:07:14 +0000 (18:07 +0200)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Mon, 21 Oct 2019 16:07:14 +0000 (18:07 +0200)
src/lib/import.c
tests/import/class_template.c

index 27285ac7fa8322b989d9081365f3d25af7b8d6a4..5d3400679bfc6e9968e0b8da3b64f986d0c65065 100644 (file)
@@ -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;
index e532daa58c8d863347025d0df6976fa05b799eb7..92309b6be08e221a68eebd0d785ef8d27973c366 100644 (file)
@@ -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;