Files
kotlin-fork/compiler/testData/codegen/box/reflection/mapping/privateProperty.kt
T
Mark Punzalan e226561150 [JVM IR] Copy metadata in IrFieldBuilder.
This fixes an issue with lateinit properties where the metadata from
the original field was not copied to the nullable field in
LateinitLowering. Also consolidated related tests.
2020-01-29 17:12:16 +01:00

22 lines
472 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// WITH_REFLECT
import kotlin.reflect.*
import kotlin.reflect.full.*
import kotlin.reflect.jvm.*
import kotlin.test.*
class K(private var value: Long)
fun box(): String {
val p = K::class.declaredMemberProperties.single() as KMutableProperty1<K, Long>
assertNotNull(p.javaField, "Fail p field")
assertNull(p.javaGetter, "Fail p getter")
assertNull(p.javaSetter, "Fail p setter")
return "OK"
}