From: Jérémie Astor Date: Tue, 30 Jun 2020 21:26:50 +0000 (+0200) Subject: :art: Forbid type shallowing X-Git-Tag: nightly~1458 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=55737304eb3897184e1e7967dac12954b0fa7fd1;p=gwion.git :art: Forbid type shallowing --- diff --git a/src/parse/scan0.c b/src/parse/scan0.c index e57a3d00..5f2b6c59 100644 --- a/src/parse/scan0.c +++ b/src/parse/scan0.c @@ -29,7 +29,7 @@ static inline Type scan0_type(const Env env, const m_uint xid, } ANN static inline m_bool scan0_defined(const Env env, const Symbol s, const loc_t pos) { - if(nspc_lookup_type0(env->curr, s)) + if(nspc_lookup_type1(env->curr, s)) ERR_B(pos, _("type '%s' already defined"), s_name(s)); return already_defined(env, s, pos); }