KT-23397 Optimize out field for property delegate when it's safe (JVM)
This commit is contained in:
committed by
teamcity
parent
9ee0268197
commit
65b2cee913
+26
@@ -0,0 +1,26 @@
|
||||
// CHECK_BYTECODE_LISTING
|
||||
|
||||
class A {
|
||||
val b = B()
|
||||
}
|
||||
|
||||
class B {
|
||||
val c = C()
|
||||
}
|
||||
|
||||
class C {
|
||||
val d = D()
|
||||
}
|
||||
|
||||
class D {
|
||||
val e = 1
|
||||
}
|
||||
|
||||
val a = A()
|
||||
|
||||
operator fun Int.getValue(thisRef: Any?, property: Any?) =
|
||||
if (this == 1 && thisRef == null) "OK" else "Failed"
|
||||
|
||||
val x by a.b.c.d.e
|
||||
|
||||
fun box() = x
|
||||
Reference in New Issue
Block a user