From: Jérémie Astor Date: Mon, 13 Apr 2020 16:40:08 +0000 (+0200) Subject: :bomb: Unamed union must be unique X-Git-Tag: nightly~1704 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=ce1d0951bdf4d83060d9fa691091d6059ad9f6d3;p=gwion.git :bomb: Unamed union must be unique --- diff --git a/src/parse/scan0.c b/src/parse/scan0.c index ce12253b..2481ff82 100644 --- a/src/parse/scan0.c +++ b/src/parse/scan0.c @@ -281,6 +281,7 @@ ANN m_bool scan0_union_def(const Env env, const Union_Def udef) { SET_FLAG(udef->type, checked); } else { const Symbol sym = scan0_sym(env, "union", udef->pos); + CHECK_BB(scan0_defined(env, sym, udef->pos)) const Type t = union_type(env, sym, 1); udef->value = union_value(env, t, sym); udef->value->flag |= udef->flag;