Files
kotlin-fork/compiler/testData/diagnostics/tests/regressions/kt35626small.kt
T
Ilya Chernikov 70c89a28e1 Stop subtyping constraint search if equality constraints for...
all not fixed type vars are found
#KT-35626 fixed
2020-03-12 08:02:45 +01:00

23 lines
473 B
Kotlin
Vendored

// FIR_IDENTICAL
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_PARAMETER
class Result<T> {
fun <R> map(transform: (T) -> R): Result<R> = TODO()
}
class TupleX<T1, T2, T3, T4>(
val _1: T1, val _2: T2, val _3: T3, val _4: T4
)
fun <K1, K2, K3, K4> rules(res: Result<Any>):
Result<TupleX<K1, K2, K3, K4>> {
return res.map {
@Suppress("UNCHECKED_CAST")
TupleX(
it as K1, it as K2, it as K3, it as K4
)
}
}