Minor, add regression test for KT-58772

#KT-58772
This commit is contained in:
Alexander Udalov
2023-06-08 00:56:43 +02:00
committed by Space Team
parent ccf4a6813c
commit b992e698e4
7 changed files with 56 additions and 0 deletions
@@ -0,0 +1,21 @@
// TARGET_BACKEND: JVM
// WITH_REFLECT
import kotlin.reflect.*
import kotlin.reflect.full.*
interface Base {
val message: String
}
class C(val base: Base) : Base by base
fun box(): String {
val prop = C::class.memberProperties.single { it.name == "message" } as KProperty1<C, String>
val c = C(object : Base {
override val message: String = "OK"
})
return prop.get(c)
}