]> Nishi Git Mirror - gwion.git/commitdiff
:art: Introduce distinct
authorJérémie Astor <fennecdjay@gmail.com>
Thu, 4 Feb 2021 15:50:04 +0000 (16:50 +0100)
committerJérémie Astor <fennecdjay@gmail.com>
Thu, 4 Feb 2021 15:50:04 +0000 (16:50 +0100)
ast
src/parse/scan0.c

diff --git a/ast b/ast
index e3ea3bb0f5634a3a620ac7a8c535976fd5afa530..97305d5a041c72799d6a26f98960b460bd87bbbf 160000 (submodule)
--- a/ast
+++ b/ast
@@ -1 +1 @@
-Subproject commit e3ea3bb0f5634a3a620ac7a8c535976fd5afa530
+Subproject commit 97305d5a041c72799d6a26f98960b460bd87bbbf
index 2972a5a9bd260cae33eadff6a0af7492a4acf269..9f9fc336d45ec890e6e7b1c8a0370c496ceda0a4 100644 (file)
@@ -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;
 }