]> Nishi Git Mirror - gwion.git/commitdiff
:art: Improve check_td
authorJérémie Astor <astor.jeremie@wanadoo.fr>
Sun, 15 Dec 2019 11:52:35 +0000 (12:52 +0100)
committerJérémie Astor <astor.jeremie@wanadoo.fr>
Sun, 15 Dec 2019 11:52:35 +0000 (12:52 +0100)
src/parse/check.c

index a01aa9bcc7fb523700fc5894a841d351c8d067a5..3e5b2aa29493d900b145cc172787c9bcd5953dbf 100644 (file)
@@ -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)