Change map key type in AnnotationDescriptor.getAllValueArguments
Turns out, only the parameter's name is needed at all usages of this method. Such a map is both easier to use (no need to call ValueParameterDescriptor.getName) and easier to construct (no need to resolve annotation class, its constructor, its parameters). In this commit, only usages have changed but the implementations are still using the old logic, this is going to be refactored in subsequent commits
This commit is contained in:
+2
-2
@@ -34,9 +34,9 @@ class AnnotationSerializer(private val stringTable: StringTable) {
|
||||
|
||||
id = stringTable.getFqNameIndex(annotationClass)
|
||||
|
||||
for ((parameter, value) in annotation.allValueArguments) {
|
||||
for ((name, value) in annotation.allValueArguments) {
|
||||
val argument = ProtoBuf.Annotation.Argument.newBuilder()
|
||||
argument.nameId = stringTable.getStringIndex(parameter.name.asString())
|
||||
argument.nameId = stringTable.getStringIndex(name.asString())
|
||||
argument.setValue(valueProto(value))
|
||||
addArgument(argument)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user