]> Nishi Git Mirror - gwion.git/commitdiff
:art: Improve check_decl
authorfennecdjay <astor.jeremie@wanadoo.fr>
Thu, 10 Oct 2019 17:45:24 +0000 (19:45 +0200)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Thu, 10 Oct 2019 17:45:24 +0000 (19:45 +0200)
src/parse/check.c

index 39c31001ff65f79f334d56df64468bac3b4d02c8..43b9716435e28bb0e7d36b5b48b2dbf8ab03a1a8 100644 (file)
@@ -167,12 +167,6 @@ ANN Type check_exp_decl(const Env env, const Exp_Decl* decl) {
     CHECK_BO(scan1_exp(env, exp_self(decl)))
     CHECK_BO(scan2_exp(env, exp_self(decl)))
     const Type t_auto = env->gwion->type[et_auto];
-    if(is_class(env->gwion, decl->type)) {
-      Var_Decl_List list = decl->list;
-      do list->self->value->type = t_auto;
-      while((list = list->next));
-      ((Exp_Decl*)decl)->type = t_auto;
-    }
     if(decl->type == t_auto)
       ERR_O(td_pos(decl->td), _("can't infer type."));
   }