From: Jérémie Astor Date: Thu, 14 Apr 2022 15:23:20 +0000 (+0200) Subject: :art: samll fixes X-Git-Tag: nightly~317 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=3fd5cc4ff79c4b68ae995632dcf475ec172b81e8;p=gwion.git :art: samll fixes --- diff --git a/src/parse/check.c b/src/parse/check.c index 8f1426dc..e3cdc3b1 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -402,6 +402,8 @@ ANN static Type check_prim_id(const Env env, const Symbol *data) { ANN static Type check_prim_perform(const Env env, const Symbol *data) { env_add_effect(env, *data, prim_pos(data)); env_weight(env, 1); + if (env->func && env->scope->depth == 1) // so ops no dot set scope->depth ? + set_fflag(env->func, fflag_return); return env->gwion->type[et_void]; } @@ -791,7 +793,7 @@ ANN m_bool func_check(const Env env, Exp_Call *const exp) { CHECK_OB(check_exp(env, exp->func)); if (exp->func->exp_type == ae_exp_decl) ERR_B(exp->func->pos, _("Can't call late function pointer at declaration " - "site. did you meant to use `@=>`?")) + "site. did you meant to use `=>`?")) const Type t = actual_type(env->gwion, exp->func->type); if (is_func(env->gwion, t) && exp->func->exp_type == ae_exp_dot && !t->info->value->from->owner_class) {