[FIR] Implement extension for providing additional type attributes

This commit is contained in:
Dmitriy Novozhilov
2021-09-30 14:34:51 +03:00
committed by TeamCityServer
parent 32709151c3
commit 38877ba842
19 changed files with 374 additions and 25 deletions
@@ -609,7 +609,7 @@ class FirMemberDeserializer(private val c: FirDeserializationContext) {
private fun ProtoBuf.Type.toTypeRef(context: FirDeserializationContext): FirTypeRef {
return buildResolvedTypeRef {
annotations += context.annotationDeserializer.loadTypeAnnotations(this@toTypeRef, context.nameResolver)
val attributes = annotations.computeTypeAttributes()
val attributes = annotations.computeTypeAttributes(context.session)
type = context.typeDeserializer.type(this@toTypeRef, attributes)
}
}
@@ -109,7 +109,7 @@ class FirTypeDeserializer(
fun type(proto: ProtoBuf.Type): ConeKotlinType {
val annotations = annotationDeserializer.loadTypeAnnotations(proto, nameResolver)
val attributes = annotations.computeTypeAttributes()
val attributes = annotations.computeTypeAttributes(moduleData.session)
return type(proto, attributes)
}