mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 08:31:29 +00:00
- use ConcurrentHashMap as a cache of class loaders to module descriptors - KClassImpl now has a lazy class descriptor and it manages property creation by looking (also lazily) for the property descriptor in the corresponding scope - since deserialized descriptors have full information about where a JVM symbol is located and what signature it has, new tests will begin to pass where Kotlin model and Java reflection model differ, see classObjectVar.kt
16 lines
288 B
Kotlin
16 lines
288 B
Kotlin
class A {
|
|
default object B {
|
|
var state: String = "12345"
|
|
}
|
|
}
|
|
|
|
fun box(): String {
|
|
val p = A.B::state
|
|
|
|
if (p.name != "state") return "Fail state: ${p.name}"
|
|
if (p.get(A.B) != "12345") return "Fail value: ${p.get(A.B)}"
|
|
p.set(A.B, "OK")
|
|
|
|
return p[A.B]
|
|
}
|