FIR Java: make type annotations lazy
This commit is contained in:
@@ -92,9 +92,12 @@ internal fun FirTypeRef.toConeKotlinTypeProbablyFlexible(
|
||||
}
|
||||
|
||||
internal fun JavaType.toFirJavaTypeRef(session: FirSession, javaTypeParameterStack: JavaTypeParameterStack): FirJavaTypeRef {
|
||||
val annotations = (this as? JavaClassifierType)?.annotations.orEmpty()
|
||||
return buildJavaTypeRef {
|
||||
annotations.mapTo(this.annotations) { it.toFirAnnotationCall(session, javaTypeParameterStack) }
|
||||
annotationBuilder = {
|
||||
(this@toFirJavaTypeRef as? JavaClassifierType)?.annotations.orEmpty().map {
|
||||
it.toFirAnnotationCall(session, javaTypeParameterStack)
|
||||
}
|
||||
}
|
||||
type = this@toFirJavaTypeRef
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user