K2: expand types during smartcasting to prevent redundant intersections
#KT-53184 Fixed
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// WITH_REFLECT
|
||||
|
||||
import kotlin.reflect.KProperty1
|
||||
|
||||
private typealias PropAlias<T> = KProperty1<T, Any?>?
|
||||
|
||||
fun box(): String {
|
||||
val backRefProp: PropAlias<Foo> = Foo::bar
|
||||
if (backRefProp != null) {
|
||||
return backRefProp.get(Foo()) as String
|
||||
}
|
||||
return "FAIL"
|
||||
}
|
||||
|
||||
class Foo {
|
||||
val bar: String = "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user