+
+ # No old style? The look for new-style super constructors (called from a old style constructor)
+ var the_root_init_mmethod = modelbuilder.the_root_init_mmethod
+ if the_root_init_mmethod != null and auto_super_inits.is_empty then
+ var candidatedefs = the_root_init_mmethod.lookup_definitions(mmodule, anchor)
+
+ # Search the longest-one and checks for conflict
+ var candidatedef = candidatedefs.first
+ if candidatedefs.length > 1 then
+ # Check for conflict in the order of initializers
+ # Each initializer list must me a prefix of the longest list
+ # part 1. find the longest list
+ for spd in candidatedefs do
+ if spd.initializers.length > candidatedef.initializers.length then candidatedef = spd
+ end
+ # compare
+ for spd in candidatedefs do
+ var i = 0
+ for p in spd.initializers do
+ if p != candidatedef.initializers[i] then
+ modelbuilder.error(self, "Error: Cannot do an implicit constructor call to comflicting for inherited inits {spd}({spd.initializers.join(", ")}) and {candidatedef}({candidatedef.initializers.join(", ")}). NOTE: Do not mix old-style and new-style init!")
+ return
+ end
+ i += 1
+ end
+ end
+ end
+
+ var msignature = candidatedef.new_msignature or else candidatedef.msignature
+ msignature = msignature.resolve_for(recvtype, anchor, mmodule, true)
+
+ var callsite = new CallSite(self, recvtype, mmodule, anchor, true, the_root_init_mmethod, candidatedef, msignature, false)
+ auto_super_inits.add(callsite)
+ end