typing: allow `new` on interface and abstract classes that have a `new`-factory
[nit.git] / src / semantize / auto_super_init.nit
index 19d60f5..25874e2 100644 (file)
@@ -32,10 +32,6 @@ end
 
 private class AutoSuperInitVisitor
        super Visitor
-       init
-       do
-       end
-
        redef fun visit(n)
        do
                n.accept_auto_super_init(self)
@@ -53,6 +49,7 @@ redef class AMethPropdef
        # In case of redefined constructors, is an implicit call-to-super required?
        var auto_super_call = false
 
+       # Collect initializers and build the auto-init
        fun do_auto_super_init(modelbuilder: ModelBuilder)
        do
                var mclassdef = self.parent.as(AClassdef).mclassdef.as(not null)
@@ -209,7 +206,6 @@ redef class ASendExpr
        redef fun accept_auto_super_init(v)
        do
                var mproperty = self.callsite.mproperty
-               if mproperty == null then return
                if mproperty.is_init then
                        v.has_explicit_super_init = self
                end