Really nice work with the contracts API Are there plans for the contracts to applied recursively to callee functions as well? For example, in the following (dummy) example, will the
createOnce2()
function also require to have the same contract, or are there plans for the contracts to be applied recursively from createOnce()
to createOnce2()
?
fun createOnce(runFunction: ()-> Unit) {
contract {
callsInPlace(runFunction, kotlin.contracts.InvocationKind.EXACTLY_ONCE)
}
runFunction()
}
fun createOnce2(runFunction: ()-> Unit) {
createOnce(runFunction)
}