nitc :: AMethPropdef :: check_redef
# Verification if the method have an inherited contract to apply it.
private fun check_redef(v: ContractsVisitor)
do
var mexpect = mpropdef.mproperty.mexpect
var mensure = mpropdef.mproperty.mensure
var mcontract_facet = mpropdef.mproperty.mcontract_facet
if mexpect != null then
if mcontract_facet != null and mcontract_facet.has_applied_expect then return
if mexpect.is_called(v, mpropdef.as(not null)) then mpropdef.mproperty.define_contract_facet(v, mpropdef.mclassdef, mexpect)
end
if mensure != null then
if mcontract_facet != null and mcontract_facet.has_applied_ensure then return
if mensure.is_called(v, mpropdef.as(not null)) then mpropdef.mproperty.define_contract_facet(v, mpropdef.mclassdef, mensure)
end
end
src/contracts.nit:749,2--764,4