From fe0621376d894465e9aa65b167733890e0827844 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Mon, 6 Mar 2023 15:33:27 +0100 Subject: [PATCH] :art: improve the *not legit* message --- src/parse/check.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/parse/check.c b/src/parse/check.c index ee99d401..b40704bc 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -390,8 +390,11 @@ ANN static Type prim_id_non_res(const Env env, const Symbol *data) { return v->type; } } - gwerr_basic(_("Invalid variable"), _("not legit at this point."), NULL, + m_str str = NULL; + gw_asprintf(env->gwion->mp, &str, "Invalid variable {R}%s{0}\n", name); + gwerr_basic(str, _("not legit at this point."), NULL, env->name, prim_pos(data), 0); + free_mstr(env->gwion->mp, str); did_you_mean_nspc(v ? v->from->owner : env->curr, s_name(sym)); env_set_error(env, true); return NULL; -- 2.43.0