From: fennecdjay Date: Thu, 10 Oct 2019 16:48:58 +0000 (+0200) Subject: :art: Remover useless check X-Git-Tag: nightly~2198^2~6 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=3ac6f5d8fc22128068b3e438b5600129d9820b2f;p=gwion.git :art: Remover useless check --- 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))