nitunit: learn to use `nit_dir` instead of hardcoding the path of nitg
[nit.git] / src / astbuilder.nit
index 0db3b4d..fa1d188 100644 (file)
@@ -32,7 +32,7 @@ class ASTBuilder
        # Make a new Int literal
        fun make_int(value: Int): AIntExpr
        do
-               return new AIntExpr.make(value, mmodule.get_primitive_class("Int").mclass_type)
+               return new ADecIntExpr.make(value, mmodule.get_primitive_class("Int").mclass_type)
        end
 
        # Make a new instatiation
@@ -220,7 +220,7 @@ redef class AType
        end
 end
 
-redef class AIntExpr
+redef class ADecIntExpr
        private init make(value: Int, t: MType)
        do
                self.value = value
@@ -238,7 +238,7 @@ redef class ANewExpr
                if args != null then
                        n_args.n_exprs.add_all(args)
                end
-               callsite = new CallSite(self, mtype, true, mmethod, mmethod.intro, mmethod.intro.msignature.as(not null), false)
+               callsite = new CallSite(self, mtype, mmethod.intro.mclassdef.mmodule, mtype, true, mmethod, mmethod.intro, mmethod.intro.msignature.as(not null), false)
                self.mtype = mtype
        end
 end
@@ -255,7 +255,7 @@ redef class ACallExpr
                        self.n_args.n_exprs.add_all(args)
                end
                var mtype = recv.mtype.as(not null)
-               callsite = new CallSite(self, mtype, true, mmethod, mmethod.intro, mmethod.intro.msignature.as(not null), false)
+               callsite = new CallSite(self, mtype, mmethod.intro.mclassdef.mmodule, mmethod.intro.mclassdef.bound_mtype, true, mmethod, mmethod.intro, mmethod.intro.msignature.as(not null), false)
                self.mtype = t
                self.is_typed = true
        end