src/astbuilder: generalize `create_callsite`
[nit.git] / src / astbuilder.nit
index 3fe85fd..46b8265 100644 (file)
@@ -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