Fix optimization of property delegates of platform types
The old code didn't replace the delegate field access because it was wrapped into a TYPE_OP IMPLICIT_NOTNULL. #KT-54463 Fixed
This commit is contained in:
committed by
Space Team
parent
ac74ce5f27
commit
8812f632cc
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// FILE: A.java
|
||||
|
||||
public class A {
|
||||
public static A create() { return new A(); }
|
||||
}
|
||||
|
||||
// FILE: box.kt
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class C {
|
||||
private val valueState = A.create()
|
||||
private val value by valueState
|
||||
|
||||
fun get(): String = value
|
||||
}
|
||||
|
||||
operator fun A.getValue(thisRef: Any?, property: KProperty<*>): String = "OK"
|
||||
|
||||
fun box(): String =
|
||||
C().get()
|
||||
Reference in New Issue
Block a user