PSI2IR KT-49526 function reference type approximation hack
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// FIR_STATUS: callable reference type approximation hack not implemented
|
||||
|
||||
fun <T> id(x: T): T = x
|
||||
|
||||
fun <T> intersect(x: T, y: T): T = x
|
||||
|
||||
interface I1
|
||||
interface I2
|
||||
|
||||
class C1 : I1, I2 {
|
||||
override fun toString() = "OK"
|
||||
}
|
||||
|
||||
class C2 : I1, I2
|
||||
|
||||
fun box() =
|
||||
intersect(C1(), C2())
|
||||
.let(::id)
|
||||
.toString()
|
||||
Reference in New Issue
Block a user