JS: cache PropertyMetadata objects in property delegates
Also, remove unused PropertyMetadata instances See KT-20737, KT-20738
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// EXPECTED_REACHABLE_NODES: 1131
|
||||
// PROPERTY_NOT_USED: PropertyMetadata
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class MyDelegate(val value: String) {
|
||||
inline operator fun getValue(receiver: Any?, property: KProperty<*>): String = value
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val x by MyDelegate("OK")
|
||||
return x
|
||||
}
|
||||
Reference in New Issue
Block a user