Files
kotlin-fork/compiler/testData/diagnostics/tests/callableReference/generic/kt35896.kt
T
Dmitriy Novozhilov 88a1cb5a17 [NI] Use new type substitutor instead of old in completion of callable references
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
2020-01-15 14:01:25 +03:00

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)
}