Files
kotlin/compiler/testData/diagnostics/tests/inference/commonSystem/boundOnNullableVariable.kt
2015-07-10 15:05:07 +03:00

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