]> Nishi Git Mirror - gwion.git/commitdiff
:bug: More on effects
authorJérémie Astor <fennecdjay@gmail.com>
Thu, 29 Apr 2021 16:04:16 +0000 (18:04 +0200)
committerJérémie Astor <fennecdjay@gmail.com>
Thu, 29 Apr 2021 16:04:16 +0000 (18:04 +0200)
src/parse/check.c

index 00201261db698b002d60a2142e16b87707dd2701..a82abd7585793c763241bc03b49fa912e210f18a 100644 (file)
@@ -1135,7 +1135,7 @@ ANN static m_bool check_stmt_return(const Env env, const Stmt_Exp stmt) {
   if(isa(ret_type, env->func->def->base->ret_type) > 0)
     return GW_OK;
   if(tflag(ret_type, tflag_noret))
-    ERR_B(stmt->val->pos, _("Can't use type `{+G}%s{+G}` for return"));
+    ERR_B(stmt->val->pos, _("Can't use type `{+G}%s{+G}` for return"), ret_type->name);
   if(stmt->val) {
     if(env->func->def->base->xid == insert_symbol("@implicit") && ret_type == env->func->def->base->args->type)
       ERR_B(stmt_self(stmt)->pos, _("can't use implicit casting while defining it"))