From: Jérémie Astor Date: Thu, 4 Feb 2021 15:50:04 +0000 (+0100) Subject: :art: Introduce distinct X-Git-Tag: nightly~981 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=7b9e84dda3e75d94ef45c60246649f629d86fa12;p=gwion.git :art: Introduce distinct --- diff --git a/ast b/ast index e3ea3bb0..97305d5a 160000 --- a/ast +++ b/ast @@ -1 +1 @@ -Subproject commit e3ea3bb0f5634a3a620ac7a8c535976fd5afa530 +Subproject commit 97305d5a041c72799d6a26f98960b460bd87bbbf diff --git a/src/parse/scan0.c b/src/parse/scan0.c index 2972a5a9..9f9fc336 100644 --- a/src/parse/scan0.c +++ b/src/parse/scan0.c @@ -125,7 +125,6 @@ ANN static void typedef_simple(const Env env, const Type_Def tdef, const Type ba if(base->nspc) nspc_addref((t->nspc = base->nspc)); t->flag = tdef->ext->flag; - scan0_implicit_similar(env, t, base); if(tdef->ext->array && !tdef->ext->array->exp) set_tflag(t, tflag_empty); } @@ -163,6 +162,8 @@ ANN m_bool scan0_type_def(const Env env, const Type_Def tdef) { CHECK_BB(typedef_complex(env, tdef, base)) } else typedef_fptr(env, tdef, base); + if(!tdef->distinct) + scan0_implicit_similar(env, tdef->type, base); set_tflag(tdef->type, tflag_typedef); return GW_OK; } @@ -189,7 +190,7 @@ ANN static Type enum_type(const Env env, const Enum_Def edef) { t->info->owner_class = env->class_def; add_type(env, nspc, t); mk_class(env, t); - scan0_implicit_similar(env, t, env->gwion->type[et_int]); +// scan0_implicit_similar(env, t, env->gwion->type[et_int]); return t; }