What is the benefit of having local delegated properties listed in
@Metadata
?
u
udalov
02/08/2019, 9:06 PM
This is the only way for Kotlin reflection to make sense of the property represented by a
KProperty
object that needs to be passed to a delegate's `getValue`/`setValue`. Since the property is local, its signature is stored in the metadata of the containing class/file, where reflection loads it and constructs the correct
KProperty
instance.
And since
kotlinx-metadata-jvm
provides the full read/write access to the metadata, it ended up here too