From: Jérémie Astor Date: Mon, 9 Dec 2019 21:05:49 +0000 (+0100) Subject: :art: Check decl_type X-Git-Tag: nightly~2001 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=0318203bc258ef8012e886acd59778d82f814784;p=gwion.git :art: Check decl_type --- diff --git a/src/parse/check.c b/src/parse/check.c index 45dfc7cb..23815fa2 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -155,7 +155,8 @@ ANN Type check_exp_decl(const Env env, const Exp_Decl* decl) { if(decl->type == t_auto) ERR_O(td_pos(decl->td), _("can't infer type.")); } - assert(decl->type); // was ERR_O(td_pos(decl->td), _("can't infer type.")); + if(!decl->type) + ERR_O(td_pos(decl->td), _("can't find type")); { const Type t = get_type(decl->type); if(GET_FLAG(t, template) && !GET_FLAG(t, check))