typing: stub to handle callrefs
authorJean Privat <jean@pryen.org>
Tue, 9 Jul 2019 15:11:18 +0000 (11:11 -0400)
committerJean Privat <jean@pryen.org>
Tue, 13 Aug 2019 15:02:28 +0000 (11:02 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/semantize/typing.nit

index 453dd1f..a85a1b0 100644 (file)
@@ -2165,6 +2165,24 @@ redef class AInitExpr
        redef fun compute_raw_arguments do return n_args.to_a
 end
 
        redef fun compute_raw_arguments do return n_args.to_a
 end
 
+redef class ACallrefExpr
+       redef fun property_name do return n_qid.n_id.text
+       redef fun property_node do return n_qid
+       redef fun compute_raw_arguments do return n_args.to_a
+
+       redef fun accept_typing(v)
+       do
+               super # do the job as if it was a real call
+
+               # TODO: inspect self.callsite to get information about the method
+               var res = callsite.mproperty
+
+               # TODO: return a functionnal type
+               self.mtype = null
+               v.error(self, "Error: NOT YET IMPLEMENTED callref expressions.")
+       end
+end
+
 redef class AExprs
        fun to_a: Array[AExpr] do return self.n_exprs.to_a
 end
 redef class AExprs
        fun to_a: Array[AExpr] do return self.n_exprs.to_a
 end