Merge: Fixes for supercalls
authorJean Privat <jean@pryen.org>
Fri, 15 Aug 2014 21:21:34 +0000 (17:21 -0400)
committerJean Privat <jean@pryen.org>
Fri, 15 Aug 2014 21:21:34 +0000 (17:21 -0400)
A bug was found while working on the new constructors.

Pull-Request: #672
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

src/global_compiler.nit
src/phase.nit

index 0905ca8..9a82243 100644 (file)
@@ -480,7 +480,8 @@ class GlobalCompilerVisitor
        do
                check_valid_reciever(recvtype)
                #debug("call {m} on {recvtype} on {args.first}:{args.first.mtype}")
-               if m.mclassdef.mclass.name == "Object" and recvtype.ctype == "val*" then
+               if m.mproperty.is_toplevel then
+                       # Do not customize top-level methods
                        recvtype = m.mclassdef.bound_mtype
                end
                return recvtype
index ace2cb9..0705139 100644 (file)
@@ -98,7 +98,6 @@ redef class ToolContext
                                end
                                errcount = self.error_count
                                for nclassdef in nmodule.n_classdefs do
-                                       self.info(" phase: {phase} for {nclassdef.location}", 3)
                                        assert phase.toolcontext == self
                                        phase.process_nclassdef(nclassdef)
                                        for npropdef in nclassdef.n_propdefs do