auto_super_init: handle the case of constructors redefinition (instead of infinitivel...
[nit.git] / src / abstract_compiler.nit
index 6656d5b..979832a 100644 (file)
@@ -1834,9 +1834,13 @@ redef class AMethPropdef
                                for i in [0..auto_super_init.msignature.arity+1[ do
                                        args.add(arguments[i])
                                end
+                               assert auto_super_init.mproperty != mpropdef.mproperty
                                v.compile_callsite(auto_super_init, args)
                        end
                end
+               if auto_super_call then
+                       v.supercall(mpropdef, arguments.first.mtype.as(MClassType), arguments)
+               end
 
                var n_block = n_block
                if n_block != null then