88a1cb5a17
It's necessary because of new type substitutor is eager than odl, so if there is a substitution of type parameter deep inside type arguments then second substitutor wins against first #KT-35896 Fixed
16 lines
260 B
Kotlin
Vendored
16 lines
260 B
Kotlin
Vendored
// !LANGUAGE: +NewInference
|
|
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
|
// ISSUE: KT-35896
|
|
|
|
interface B<E, SC>
|
|
|
|
class Inv<T>
|
|
|
|
class Foo<T>(x: Int): B<T, Inv<T>>
|
|
|
|
fun <T1, T2, S> bar(list: T2, fn: (S) -> B<T1, T2>) {}
|
|
|
|
fun <K> foo(list: Inv<K>) {
|
|
bar(list, ::Foo)
|
|
}
|