mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
11 lines
248 B
Kotlin
Vendored
11 lines
248 B
Kotlin
Vendored
import kotlin.reflect.*
|
|
import kotlin.reflect.jvm.*
|
|
|
|
fun box(): String {
|
|
val a = J()
|
|
val p = J::class.members.single { it.name == "result" } as KMutableProperty1<J, String>
|
|
p.isAccessible = true
|
|
p.set(a, "OK")
|
|
return p.get(a)
|
|
}
|