]> Nishi Git Mirror - gwion.git/commitdiff
:bomb: Unamed union must be unique
authorJérémie Astor <astor.jeremie@wanadoo.fr>
Mon, 13 Apr 2020 16:40:08 +0000 (18:40 +0200)
committerJérémie Astor <astor.jeremie@wanadoo.fr>
Mon, 13 Apr 2020 16:40:08 +0000 (18:40 +0200)
src/parse/scan0.c

index ce12253bb6cb2a8d94ed3db1417d00bd7e968f74..2481ff82ac3e51740d7f8af5d3d3b52c44095893 100644 (file)
@@ -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;