The returned MSignature
is the copy of self
without return type.
The return type is replaced by a new parameter result
# Adapt signature for a ensure contract
#
# The returned `MSignature` is the copy of `self` without return type.
# The return type is replaced by a new parameter `result`
private fun adapt_to_ensurecondition: MSignature
do
var rtype = return_mtype
var msignature = adapt_to_contract
if rtype != null then
msignature.mparameters.add(new MParameter("result", rtype, false))
end
return msignature
end
src/contracts.nit:774,2--786,4