From: Jean Privat Date: Tue, 9 Jul 2019 15:11:18 +0000 (-0400) Subject: typing: stub to handle callrefs X-Git-Url: http://nitlanguage.org typing: stub to handle callrefs Signed-off-by: Jean Privat --- diff --git a/src/semantize/typing.nit b/src/semantize/typing.nit index 453dd1f..a85a1b0 100644 --- a/src/semantize/typing.nit +++ b/src/semantize/typing.nit @@ -2165,6 +2165,24 @@ redef class AInitExpr 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