Improve API of annotation arguments in kotlinx-metadata

See changes in ChangeLog.md for more information
This commit is contained in:
Alexander Udalov
2021-03-26 20:51:52 +01:00
parent 1a82158472
commit 5f7f4a4ac8
13 changed files with 99 additions and 70 deletions
@@ -118,7 +118,7 @@ internal class KlibPropertyExtension : KlibPropertyExtensionVisitor(), KmPropert
val setterAnnotations: MutableList<KmAnnotation> = mutableListOf()
var uniqId: UniqId? = null
var file: Int? = null
var compileTimeValue: KmAnnotationArgument<*>? = null
var compileTimeValue: KmAnnotationArgument? = null
override fun visitAnnotation(annotation: KmAnnotation) {
annotations += annotation
@@ -140,7 +140,7 @@ internal class KlibPropertyExtension : KlibPropertyExtensionVisitor(), KmPropert
this.uniqId = uniqId
}
override fun visitCompileTimeValue(value: KmAnnotationArgument<*>) {
override fun visitCompileTimeValue(value: KmAnnotationArgument) {
this.compileTimeValue = value
}
@@ -299,7 +299,7 @@ internal class KlibMetadataExtensions : MetadataExtensions {
)
}
override fun visitCompileTimeValue(value: KmAnnotationArgument<*>) {
override fun visitCompileTimeValue(value: KmAnnotationArgument) {
proto.setExtension(
KlibMetadataProtoBuf.compileTimeValue,
value.writeAnnotationArgument(c.strings).build()
@@ -62,7 +62,7 @@ var KmProperty.file: Int?
klibExtensions.file = value
}
var KmProperty.compileTimeValue: KmAnnotationArgument<*>?
var KmProperty.compileTimeValue: KmAnnotationArgument?
get() = klibExtensions.compileTimeValue
set(value) {
klibExtensions.compileTimeValue = value
@@ -65,7 +65,7 @@ abstract class KlibPropertyExtensionVisitor : KmPropertyExtensionVisitor {
abstract fun visitUniqId(uniqId: UniqId)
abstract fun visitCompileTimeValue(value: KmAnnotationArgument<*>)
abstract fun visitCompileTimeValue(value: KmAnnotationArgument)
override val type: KmExtensionType
get() = TYPE