]> Nishi Git Mirror - gwion.git/commitdiff
:art: Check unknown type on template push
authorJérémie Astor <astor.jeremie@wanadoo.fr>
Sat, 14 Dec 2019 22:11:50 +0000 (23:11 +0100)
committerJérémie Astor <astor.jeremie@wanadoo.fr>
Sat, 14 Dec 2019 22:11:50 +0000 (23:11 +0100)
src/parse/template.c

index 0fb1e23f7fed26cfc27c670f4a3b0199d5f98fcb..fb84336e07ba4f1aec2a47c534ab0060add6ba6e 100644 (file)
@@ -99,7 +99,8 @@ ANN m_bool template_push_types(const Env env, const Tmpl *tmpl) {
     if(!call)
       break;
     const Type t = known_type(env, call->td);
-    assert(t);
+    if(!t)
+      return GW_ERROR;
     nspc_add_type(env->curr, list->xid, t);
     call = call->next;
   } while((list = list->next));