// IGNORE_BACKEND: JVM // JVM_IR it this case has an approximated type 'KFun', which has a projected top-level argument. fun intersect(x: T, y: T): T = x interface I1 interface I2 class C1 : I1, I2 { override fun toString(): String = "OK" } class C2 : I1, I2 fun T.k() = K(this) fun interface KFun { fun invoke(x: T) } class K(private val x: T) { fun with(kf: KFun) { kf.invoke(x) } } fun box(): String { var result = "Failed" intersect(C1(), C2()).k().with { result = it.toString() } return result }