Files
kotlin-fork/compiler/testData/codegen/box/reflection/properties/localDelegated/inLambda.kt
T
pyos 1663619606 JVM_IR: add local delegated property metadata to non-synthetic classes
Otherwise kotlin-reflect won't find it (and it won't even be serialized
anyway).

 #KT-42562 Fixed
2020-10-12 21:14:00 +02:00

12 lines
245 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// WITH_REFLECT
import kotlin.reflect.*
inline operator fun String.getValue(t:Any?, p: KProperty<*>): String =
if (p.returnType.classifier == String::class) this else "fail"
fun box() = {
val x by "OK"
x
}()