From: Jérémie Astor Date: Sun, 15 Dec 2019 11:52:35 +0000 (+0100) Subject: :art: Improve check_td X-Git-Tag: nightly~1985 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=7c47757f6510508cf3e0b8f49469351c518fc07b;p=gwion.git :art: Improve check_td --- diff --git a/src/parse/check.c b/src/parse/check.c index a01aa9bc..3e5b2aa2 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -88,6 +88,8 @@ ANN Type check_td(const Env env, Type_Decl *td) { CHECK_OO(check_exp(env, td->exp)) const Type t = actual_type(env->gwion, td->exp->type); assert(t); + if(GET_FLAG(t, template) && !GET_FLAG(t, ref)) + ERR_O(td_pos(td), _("type '%s' needs template types"), t->name) td->xid = new_id_list(env->gwion->mp, insert_symbol("@resolved"), loc_cpy(env->gwion->mp, td->exp->pos)); if(t->array_depth)