model-clients: use `is_root_init` instead of `.name == "init"`
[nit.git] / src / interpreter / debugger.nit
index 771d4a2..8723ed7 100644 (file)
@@ -289,7 +289,7 @@ class Debugger
                                print "Error, invalid propdef to call at runtime !"
                                return null
                        end
-               else if mproperty.name == "init" then
+               else if mproperty.is_root_init then
                        var nclassdef = self.modelbuilder.mclassdef2nclassdef[mpropdef.mclassdef]
                        self.parameter_check(nclassdef, mpropdef, args)
                        return nclassdef.call(self, mpropdef, args)