typing: ANew distinguish the type of the class and the returned type
[nit.git] / src / astbuilder.nit
index cf31299..620bf49 100644 (file)
@@ -275,6 +275,7 @@ redef class ANewExpr
                        n_args.n_exprs.add_all(args)
                end
                self.callsite = callsite
+               self.recvtype = callsite.recv.as(MClassType)
                if callsite.mproperty.is_new then
                        self.mtype = callsite.msignature.return_mtype
                else