]> Nishi Git Mirror - gwion.git/commitdiff
:art: improve tuple info
authorfennecdjay <astor.jeremie@wanadoo.fr>
Sat, 26 Oct 2019 19:17:52 +0000 (21:17 +0200)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Sat, 26 Oct 2019 19:17:52 +0000 (21:17 +0200)
src/lib/tuple.c

index fe363b2ec3440eed6e66fa8535e990f2a321e30f..e0a6eae7997628ec0660e2de5cf8f9f1424d9394 100644 (file)
@@ -236,12 +236,8 @@ ANN void tuple_info(const Env env, Type_Decl *base, const Var_Decl var) {
   vector_add(&env->class_def->e->tuple->types, (vtype)v->type);
   vector_add(&env->class_def->e->tuple->offset, offset + v->type->size);
   Type_Decl *td = cpy_type_decl(env->gwion->mp, base);
-  if(var->array) {
-    if(td->array)
-      td->array->depth += var->array->depth;
-    else
-      td->array = cpy_array_sub(env->gwion->mp, var->array);
-  }
+  if(var->array)
+    td->array = cpy_array_sub(env->gwion->mp, var->array);
   if(env->class_def->e->tuple->list) {
     Type_List tl = env->class_def->e->tuple->list;
     while(tl->next)