From f56707ab7b2c80774e099dc54c3ef723942d7a07 Mon Sep 17 00:00:00 2001 From: Florian Deljarry Date: Tue, 5 Nov 2019 19:58:38 -0500 Subject: [PATCH] modelize_property: Remove root_init in MClass Signed-off-by: Florian Deljarry --- src/modelize/modelize_property.nit | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/modelize/modelize_property.nit b/src/modelize/modelize_property.nit index 98f97e2..b41824d 100644 --- a/src/modelize/modelize_property.nit +++ b/src/modelize/modelize_property.nit @@ -363,7 +363,6 @@ redef class ModelBuilder mpropdef.msignature = msignature mclassdef.auto_init = mpropdef self.toolcontext.info("{mclassdef} gets a free auto constructor `{mpropdef}{msignature}`. {spropdefs}", 3) - #mclassdef.mclass.root_init = mpropdef mclassdef.mclass.the_root_init_mmethod = the_root_init_mmethod end end @@ -500,12 +499,6 @@ end redef class MClass # The base init of the class. # - # TODO: Where to put this information is not clear because unlike other - # informations, the initialisers are stable in a same class. - var root_init: nullable MMethodDef = null - - # The base init of the class. - # # TODO: merge with `root_init` and `ModelBuilder::the_root_init_mmethod` if possible var the_root_init_mmethod: nullable MMethod = null end @@ -899,15 +892,6 @@ redef class AMethPropdef var mmodule = mclassdef.mmodule var nsig = self.n_signature - if mpropdef.mproperty.is_root_init and not mclassdef.is_intro then - var root_init = mclassdef.mclass.root_init - if root_init != null then - # Inherit the initializers by refinement - assert mpropdef.initializers.is_empty - mpropdef.initializers.add_all root_init.initializers - end - end - var accept_special_last_parameter = self.n_methid == null or self.n_methid.accept_special_last_parameter var return_is_mandatory = self.n_methid != null and self.n_methid.return_is_mandatory -- 1.7.9.5