a036e41809
^KT-59057 Merge-request: KT-MR-10748 Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
20 lines
387 B
Kotlin
Vendored
20 lines
387 B
Kotlin
Vendored
// TARGET_BACKEND: JVM
|
|
// TARGET_BACKEND: JVM_IR
|
|
|
|
// WITH_REFLECT
|
|
|
|
import kotlin.reflect.KProperty
|
|
|
|
class Delegate {
|
|
operator fun getValue(t: Any?, p: KProperty<*>): String {
|
|
p.parameters
|
|
p.returnType
|
|
p.annotations
|
|
return p.toString()
|
|
}
|
|
}
|
|
|
|
val prop: String by Delegate()
|
|
|
|
fun box() = if (prop == "val prop: kotlin.String") "OK" else "Fail: $prop"
|