From: fennecdjay Date: Wed, 9 Oct 2019 20:34:44 +0000 (+0200) Subject: :art: Remove useless check_td test X-Git-Tag: nightly~2198^2~55 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=fe900a34296d78cef855a21ebed62531c113e34e;p=gwion.git :art: Remove useless check_td test --- diff --git a/src/parse/check.c b/src/parse/check.c index e75ad4ce..516af527 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -97,9 +97,7 @@ ANN Type check_td(const Env env, Type_Decl *td) { CHECK_OO(check_exp(env, td->exp)) // TODO: check me const Type t = actual_type(env->gwion, td->exp->type); - if(!t || (is_class(env->gwion, td->exp->type) && t == env->gwion->type[et_class])) - ERR_O(td->exp->pos, _("Expression must be of type '%s', not '%s'\n" - "maybe you meant typeof(Expression)"), env->gwion->type[et_class]->name, td->exp->type->name); + assert(t); m_uint depth; td->xid = str2list(env, t->name, &depth, td->exp->pos); if(depth) {