From: Florian Deljarry Date: Tue, 2 Jun 2020 14:59:54 +0000 (-0400) Subject: src/astbuilder: generalize `create_callsite` X-Git-Url: http://nitlanguage.org src/astbuilder: generalize `create_callsite` Generalize `create_callsite` to take into consideration AAttrPropdef Signed-off-by: Florian Deljarry --- diff --git a/src/astbuilder.nit b/src/astbuilder.nit index 3fe85fd..46b8265 100644 --- a/src/astbuilder.nit +++ b/src/astbuilder.nit @@ -203,11 +203,11 @@ class ASTBuilder # Build a callsite to call the `mproperty` in the current method `caller_method`. # `is_self_call` indicate if the method caller is a property of `self` - fun create_callsite(modelbuilder: ModelBuilder, caller_method : AMethPropdef, mproperty: MMethod, is_self_call: Bool): CallSite + fun create_callsite(modelbuilder: ModelBuilder, caller_property: APropdef, mproperty: MMethod, is_self_call: Bool): CallSite do # FIXME It's not the better solution to call `TypeVisitor` here to build a model entity, but some make need to have a callsite - var type_visitor = new TypeVisitor(modelbuilder, caller_method.mpropdef.as(not null)) - var callsite = type_visitor.build_callsite_by_property(caller_method, mproperty.intro_mclassdef.bound_mtype, mproperty, is_self_call) + var type_visitor = new TypeVisitor(modelbuilder, caller_property.mpropdef.as(not null)) + var callsite = type_visitor.build_callsite_by_property(caller_property, mproperty.intro_mclassdef.bound_mtype, mproperty, is_self_call) assert callsite != null return callsite end