FIR deserializer: signature-aware annotation loading for constructors
This commit is contained in:
committed by
Denis Zharkov
parent
955c7a1e5b
commit
12181e55c0
+6
-1
@@ -87,7 +87,12 @@ abstract class AbstractAnnotationDeserializer(
|
||||
return annotations.map { deserializeAnnotation(it, nameResolver) }
|
||||
}
|
||||
|
||||
fun loadConstructorAnnotations(constructorProto: ProtoBuf.Constructor, nameResolver: NameResolver): List<FirAnnotationCall> {
|
||||
open fun loadConstructorAnnotations(
|
||||
containerSource: DeserializedContainerSource?,
|
||||
constructorProto: ProtoBuf.Constructor,
|
||||
nameResolver: NameResolver,
|
||||
typeTable: TypeTable
|
||||
): List<FirAnnotationCall> {
|
||||
if (!Flags.HAS_ANNOTATIONS.get(constructorProto.flags)) return emptyList()
|
||||
val annotations = constructorProto.getExtension(protocol.constructorAnnotation).orEmpty()
|
||||
return annotations.map { deserializeAnnotation(it, nameResolver) }
|
||||
|
||||
+2
-1
@@ -371,7 +371,8 @@ class FirMemberDeserializer(private val c: FirDeserializationContext) {
|
||||
valueParameters += local.memberDeserializer.valueParameters(
|
||||
proto.valueParameterList, addDefaultValue = classBuilder.symbol.classId == StandardClassIds.Enum
|
||||
)
|
||||
annotations += local.annotationDeserializer.loadConstructorAnnotations(proto, local.nameResolver)
|
||||
annotations +=
|
||||
c.annotationDeserializer.loadConstructorAnnotations(c.containerSource, proto, local.nameResolver, local.typeTable)
|
||||
}.build()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user