From 0318203bc258ef8012e886acd59778d82f814784 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Mon, 9 Dec 2019 22:05:49 +0100 Subject: [PATCH] :art: Check decl_type --- src/parse/check.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)) -- 2.43.0