From: fennecdjay Date: Thu, 15 Jun 2023 12:08:39 +0000 (+0200) Subject: :art: improve defined_here X-Git-Tag: nightly~146 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=f6ec1571f789091013c1cc32de901c1514f5b33b;p=gwion.git :art: improve defined_here --- 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) {