From f6ec1571f789091013c1cc32de901c1514f5b33b Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Thu, 15 Jun 2023 14:08:39 +0200 Subject: [PATCH] :art: improve defined_here --- include/env/value.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/env/value.h b/include/env/value.h index 9e285a39..6d599fee 100644 --- a/include/env/value.h +++ b/include/env/value.h @@ -48,8 +48,11 @@ ANEW ANN Value new_value(const Env, const Type type, const m_str name, const loc ANN void valuefrom(const Env, ValueFrom *); ANN static inline void defined_here(const Value v) { - if (v->from->filename) // TODO: check why is that from check - gwerr_secondary(_("defined here"), v->from->filename, v->from->loc); + if (v->from->filename) {// TODO: check why is that from check + char c[256] = {[255] = '\0'}; + snprintf(c, 256, _("%.*s defined here"), 240, v->name); + gwerr_secondary(c, v->from->filename, v->from->loc); + } } ANN static inline void valid_value(const Env env, const Symbol xid, const Value v) { -- 2.43.0