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
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
// WITH_STDLIB
|
||||
// CHECK_BYTECODE_LISTING
|
||||
|
||||
var initialized = false
|
||||
|
||||
enum class E {
|
||||
X;
|
||||
|
||||
companion object {
|
||||
init {
|
||||
initialized = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
operator fun Any?.getValue(x: Any?, y: Any?): String {
|
||||
throw RuntimeException()
|
||||
}
|
||||
|
||||
val result by E.X
|
||||
|
||||
fun box() = if (initialized) "OK" else "FAILURE"
|
||||
Reference in New Issue
Block a user