Substitute captured types with inner intersection one (NewTypeSubstitutor)

^KT-44651 Fixed
This commit is contained in:
Victor Petukhov
2021-02-09 12:58:53 +03:00
parent 80daf120e6
commit f797ee7803
6 changed files with 39 additions and 1 deletions
@@ -0,0 +1,15 @@
// TARGET_BACKEND: JVM
// TARGET_BACKEND: JVM_IR
class X<T: Number>(val y: Any, val x: T)
fun box(): String {
val num: Long = -10
val num2: Int = 20
val obj = if (true)
X(Any(), if (true) num else num2)
else
X(Any(), -25)
val f = obj.y
return "OK"
}