// FIR_IDENTICAL // !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER // KT-7440 Cannot complete type inference if two extension functions for interface hierarchy package inferenceagain interface Base interface Derived : Base fun , T : Any> Base.maxBy(f: (T) -> R): T? = null fun , T : Any> Derived.maxBy(f: (T) -> R): T? = null fun derivedOf(vararg members: T): Derived = null!! fun x(l: Derived) { derivedOf(1, 2, 3).maxBy { it } // works derivedOf(1, 2, 3).maxBy { it } // should work }