I am not yet familiar with contracts. Is it possib...
# announcements
r
I am not yet familiar with contracts. Is it possible to pass contracts further up the call chain; kind of generic contracts? E.g.
fun <R> foo(f : ()-> R) = f ()
specify that foo takes over the contract of
f
a
Such contract inference is not supported. You're welcome to submit a feature request on http://kotl.in/issue with a description of your use case. A good place to get familiar with contracts is the Keep https://github.com/Kotlin/KEEP/blob/master/proposals/kotlin-contracts.md and its related discussion page: https://github.com/Kotlin/KEEP/issues/139.