From 7c47757f6510508cf3e0b8f49469351c518fc07b Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Sun, 15 Dec 2019 12:52:35 +0100 Subject: [PATCH] :art: Improve check_td --- src/parse/check.c | 2 ++ 1 file changed, 2 insertions(+) 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) -- 2.43.0