What is the benefit of having local delegated prop...
# compiler
m
What is the benefit of having local delegated properties listed in
@Metadata
?
u
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
🙏 1
m
Good to know, thank you!