mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-17 15:54:03 +00:00
7 lines
165 B
Kotlin
Vendored
7 lines
165 B
Kotlin
Vendored
fun <T: Any> test(f: (T) -> T?) {
|
|
doFun(f.ext())
|
|
}
|
|
|
|
fun <E : Any> Function1<E, E?>.ext(): Function0<E?> = throw Exception()
|
|
fun <R : Any> doFun(f: () -> R?) = f
|