rta: improve code for methods of classes
[nit.git] / src / rapid_type_analysis.nit
index 749dd00..f763a56 100644 (file)
@@ -258,8 +258,13 @@ class RapidTypeAnalysis
                        var npropdef = modelbuilder.mpropdef2node(mmethoddef)
 
                        if npropdef isa AClassdef then
-                               if mmethoddef.mproperty.is_root_init and not mmethoddef.is_intro then
-                                       self.add_super_send(v.receiver, mmethoddef)
+                               if mmethoddef.mproperty.is_root_init then
+                                       if not mmethoddef.is_intro then
+                                               self.add_super_send(v.receiver, mmethoddef)
+                                       end
+                               else
+                                       npropdef.debug "cannot RTA {mmethoddef}"
+                                       abort
                                end
                                continue
                        else if mmethoddef.constant_value != null then