From 113e704a8b9a767bffe8d2120a110ff90b384c09 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Wed, 22 Sep 2021 16:54:13 +0200 Subject: [PATCH] :bug: Unused operator id --- src/parse/check.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/parse/check.c b/src/parse/check.c index 8147c744..6b1ac31c 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -340,8 +340,10 @@ ANN static Type prim_id_non_res(const Env env, const Symbol *data) { const Value v = check_non_res_value(env, data); if (!v || !vflag(v, vflag_valid) || (v->from->ctx && v->from->ctx->error)) { const m_str name = s_name(*data); - if (!isalpha(*name) && *name != '_') /* && *name != '@' ???*/ + if (!isalpha(*name) && *name != '_') { /* && *name != '@' ???*/ + prim_self(data)->value = env->gwion->type[et_op]->info->value; return env->gwion->type[et_op]; + } gwerr_basic(_("Invalid variable"), _("not legit at this point."), NULL, env->name, prim_pos(data), 0); did_you_mean_nspc(v ? value_owner(env, v) : env->curr, s_name(sym)); -- 2.43.0