JVM IR: fix compound access to JvmField properties
This commit is contained in:
committed by
Alexander Udalov
parent
5c807266f6
commit
4bfa98144b
@@ -0,0 +1,22 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A {
|
||||
@JvmField val b = B()
|
||||
}
|
||||
|
||||
class B {
|
||||
@JvmField val c = C()
|
||||
|
||||
@JvmField val result = "OK"
|
||||
}
|
||||
|
||||
class C {
|
||||
@JvmField var d = "Fail"
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val a = A()
|
||||
a.b.c.d = a.b.result
|
||||
return a.b.c.d
|
||||
}
|
||||
Reference in New Issue
Block a user