https://kotlinlang.org logo
#announcements
Title
# announcements
r

robstoll

07/09/2019, 5:23 PM
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

Alexey Belkov [JB]

07/10/2019, 9:45 AM
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.