Merge branch 'annotations'
authorJean Privat <jean@pryen.org>
Sat, 27 Jul 2013 01:09:45 +0000 (21:09 -0400)
committerJean Privat <jean@pryen.org>
Sat, 27 Jul 2013 01:09:45 +0000 (21:09 -0400)
1  2 
src/rapid_type_analysis.nit

@@@ -401,7 -401,10 +401,10 @@@ private class RapidTypeVisito
                        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
@@@ -589,9 -592,15 +592,9 @@@ redef class ASuperExp
                        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