Support annotations on type aliases declarations
This commit is contained in:
@@ -306,6 +306,8 @@ class DescriptorSerializer private constructor(
|
||||
builder.setExpandedType(local.type(expandedType))
|
||||
}
|
||||
|
||||
builder.addAllAnnotation(descriptor.annotations.map { extension.annotationSerializer.serializeAnnotation(it) })
|
||||
|
||||
return builder
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@ import org.jetbrains.kotlin.types.KotlinType
|
||||
abstract class SerializerExtension {
|
||||
abstract val stringTable: StringTable
|
||||
|
||||
val annotationSerializer by lazy { AnnotationSerializer(stringTable) }
|
||||
|
||||
open fun shouldUseTypeTable(): Boolean = false
|
||||
|
||||
open fun serializeClass(descriptor: ClassDescriptor, proto: ProtoBuf.Class.Builder) {
|
||||
|
||||
-1
@@ -22,7 +22,6 @@ import org.jetbrains.kotlin.types.KotlinType
|
||||
|
||||
open class KotlinSerializerExtensionBase(private val protocol: SerializerExtensionProtocol) : SerializerExtension() {
|
||||
override final val stringTable = StringTableImpl()
|
||||
private val annotationSerializer = AnnotationSerializer(stringTable)
|
||||
|
||||
override fun serializeClass(descriptor: ClassDescriptor, proto: ProtoBuf.Class.Builder) {
|
||||
for (annotation in descriptor.annotations) {
|
||||
|
||||
Reference in New Issue
Block a user