mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 08:31:30 +00:00
Basic reflection is usable without any imports (with :: literals)
This reverts commit 9503056dd5.
14 lines
206 B
Kotlin
14 lines
206 B
Kotlin
import kotlin.reflect.KMemberProperty
|
|
|
|
class A {
|
|
class object {
|
|
val ref: KMemberProperty<A, String> = A::foo
|
|
}
|
|
|
|
val foo: String = "OK"
|
|
}
|
|
|
|
fun box(): String {
|
|
return A.ref.get(A())
|
|
}
|