Files
kotlin-fork/compiler/testData/diagnostics/tests/inference/regressions/kt2320.kt
T

15 lines
333 B
Kotlin
Vendored

// FIR_IDENTICAL
//KT-2320 failure of complex case of type inference
package i
interface NotMap<B>
interface Entry<B> {
fun getValue(): B
}
fun <V, R> NotMap<V>.mapValuesOriginal(ff: (Entry<V>) -> R): NotMap<R> = throw Exception()
fun <B, C> NotMap<B>.mapValuesOnly(f: (B) -> C) = mapValuesOriginal { e -> f(e.getValue()) }