Merge branch 'bench'
[nit.git] / src / rapid_type_analysis.nit
index 8d31112..e383656 100644 (file)
@@ -408,7 +408,10 @@ private class RapidTypeVisitor
                        var implicit_cast_to = node.implicit_cast_to
                        if implicit_cast_to != null then self.add_cast_type(implicit_cast_to)
                end
-               node.visit_all(self)
+               # RTA does not enter in AAnnotations
+               if not node isa AAnnotations then
+                       node.visit_all(self)
+               end
        end
 
        # Force to get the primitive class named `name' or abort
@@ -596,15 +599,9 @@ redef class ASuperExpr
                        return
                end
 
-               #FIXME: we do not want an ugly static call!
-               var mpropdef = v.mpropdef
-               var mpropdefs = mpropdef.mproperty.lookup_super_definitions(mpropdef.mclassdef.mmodule, mpropdef.mclassdef.bound_mtype)
-               if mpropdefs.length != 1 then
-                       debug("MPRODFEFS for super {mpropdef} for {v.receiver}: {mpropdefs.join(", ")}")
-               end
-               var msuperpropdef = mpropdefs.first
-               assert msuperpropdef isa MMethodDef
-               v.analysis.add_static_call(v.receiver, msuperpropdef)
+               var mpropdef = v.mpropdef.lookup_next_definition(v.analysis.mainmodule, v.receiver)
+               assert mpropdef isa MMethodDef
+               v.analysis.add_static_call(v.receiver, mpropdef)
        end
 end