global_compiler: remove useless methods since varargisation is done at the AST level
[nit.git] / src / rapid_type_analysis.nit
index a6adfee..897d7b7 100644 (file)
@@ -244,6 +244,9 @@ class RapidTypeAnalysis
                                        if mmethoddef.mproperty.is_root_init and not mmethoddef.is_intro then
                                                self.add_super_send(v.receiver, mmethoddef)
                                        end
+                               else if mmethoddef.constant_value != null then
+                                       # Make the return type live
+                                       v.add_type(mmethoddef.msignature.return_mtype.as(MClassType))
                                else
                                        abort
                                end
@@ -675,6 +678,8 @@ redef class AForExpr
                        abort
                end
                v.add_callsite(self.method_next)
+               var mf = self.method_finish
+               if mf != null then v.add_callsite(mf)
        end
 end