Skip to content

Commit 6025a25

Browse files
committed
astbuilder: Add parameter to get correct type
Added a parameter to provide the type of receiver rather than using the intro type of the property Signed-off-by: Delja <[email protected]>
1 parent 0afb140 commit 6025a25

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/astbuilder.nit

+2-2
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,11 @@ class ASTBuilder
203203

204204
# Build a callsite to call the `mproperty` in the current method `caller_method`.
205205
# `is_self_call` indicate if the method caller is a property of `self`
206-
fun create_callsite(modelbuilder: ModelBuilder, caller_property: APropdef, mproperty: MMethod, is_self_call: Bool): CallSite
206+
fun create_callsite(modelbuilder: ModelBuilder, caller_property: APropdef, recvtype: MType, mproperty: MMethod, is_self_call: Bool): CallSite
207207
do
208208
# FIXME It's not the better solution to call `TypeVisitor` here to build a model entity, but some make need to have a callsite
209209
var type_visitor = new TypeVisitor(modelbuilder, caller_property.mpropdef.as(not null))
210-
var callsite = type_visitor.build_callsite_by_property(caller_property, mproperty.intro_mclassdef.bound_mtype, mproperty, is_self_call)
210+
var callsite = type_visitor.build_callsite_by_property(caller_property, recvtype, mproperty, is_self_call)
211211
assert callsite != null
212212
return callsite
213213
end

0 commit comments

Comments
 (0)