If the property is linked to a contract a new callsite will be created towards the correct facet,
in the other case the returned callsite wall be the same as the given callsite
# Check if the callsite is bound on a property with a contract.
# If the property is linked to a contract a new callsite will be created towards the correct facet,
# in the other case the returned callsite wall be the same as the given `callsite`
private fun drive_callsite_to_contract(callsite: CallSite): CallSite
do
var contract_facet = callsite.mproperty.mcontract_facet
var visited_mpropdef = visited_propdef.mpropdef
if visited_mpropdef isa MContract or visited_mpropdef isa MFacet then return callsite
if visited_mpropdef == null or contract_facet == null then return callsite
return ast_builder.create_callsite(toolcontext.modelbuilder, visited_propdef, contract_facet, callsite.recv_is_self)
end
src/contracts.nit:236,2--248,4