From 3ac6f5d8fc22128068b3e438b5600129d9820b2f Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Thu, 10 Oct 2019 18:48:58 +0200 Subject: [PATCH] :art: Remover useless check --- src/parse/check.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/parse/check.c b/src/parse/check.c index 2f4a100d..a461dd65 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -176,8 +176,7 @@ 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.")); } - if(!decl->type) - ERR_O(td_pos(decl->td), _("can't infer type.")); + assert(decl->type); // was ERR_O(td_pos(decl->td), _("can't infer type.")); { const Type t = get_type(decl->type); if(GET_FLAG(t, template) && !GET_FLAG(t, check)) -- 2.43.0