From 309af8952e1cc586ab9d6cc48d7a847039e13786 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Sat, 14 Dec 2019 23:11:50 +0100 Subject: [PATCH] :art: Check unknown type on template push --- src/parse/template.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/parse/template.c b/src/parse/template.c index 0fb1e23f..fb84336e 100644 --- a/src/parse/template.c +++ b/src/parse/template.c @@ -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)); -- 2.43.0