Files
kotlin-fork/compiler/testData/codegen/box/delegatedProperty/local/useReflectionForLocalVarInLambda.kt
T
Alexander Udalov 1daeebcdd3 Minor, add regression test
#KT-42562
2020-10-12 21:37:37 +02:00

15 lines
279 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// WITH_REFLECT
import kotlin.reflect.*
object E
operator fun E.getValue(receiver: Any?, property: KProperty<*>): String =
if (property.returnType.classifier == String::class) "OK" else "Fail"
fun box(): String = {
val x: String by E
x
}()