X-Git-Url: http://nitlanguage.org diff --git a/src/semantize/typing.nit b/src/semantize/typing.nit index c1dcb1d..98aba77 100644 --- a/src/semantize/typing.nit +++ b/src/semantize/typing.nit @@ -1038,6 +1038,18 @@ redef class AExpr end return res end + + # Type the expression as if located in `visited_mpropdef` + # `TypeVisitor` and `PostTypingVisitor` will be used to do the typing, see them for more information. + # + # `visited_mpropdef`: Correspond to the evaluation context in which the expression is located. + fun do_typing(modelbuilder: ModelBuilder, visited_mpropdef: MPropDef) + do + var type_visitor = new TypeVisitor(modelbuilder, visited_mpropdef) + type_visitor.visit_stmt(self) + var post_visitor = new PostTypingVisitor(type_visitor) + post_visitor.enter_visit(self) + end end redef class ABlockExpr @@ -1999,9 +2011,7 @@ redef class ASendExpr var args = compute_raw_arguments - if not self isa ACallrefExpr then - callsite.check_signature(v, node, args) - end + if not self isa ACallrefExpr then callsite.check_signature(v, node, args) if callsite.mproperty.is_init then var vmpropdef = v.mpropdef