Substitute captured types with inner intersection one (NewTypeSubstitutor)
^KT-44651 Fixed
This commit is contained in:
+15
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user