[AA] Deserialize reference to typealias from stubs as fully expanded

#KT-58335
This commit is contained in:
Kirill Rakhman
2023-05-09 14:26:03 +02:00
committed by Space Team
parent 80d68fc908
commit 3c22b1ce53
3 changed files with 67 additions and 45 deletions
@@ -40,11 +40,7 @@ class TypeClsStubBuilder(private val c: ClsStubBuilderContext) {
additionalAnnotations: () -> List<AnnotationWithTarget> = { emptyList() },
loadTypeAnnotations: (Type) -> List<AnnotationWithArgs> = { c.components.annotationLoader.loadTypeAnnotations(it, c.nameResolver) }
) {
val abbreviatedType = type.abbreviatedType(c.typeTable)
if (abbreviatedType != null) {
return createTypeReferenceStub(parent, abbreviatedType, additionalAnnotations)
}
// TODO: Return abbreviated type aliases, see KT-58542
val typeReference = KotlinPlaceHolderStubImpl<KtTypeReference>(parent, KtStubElementTypes.TYPE_REFERENCE)
val allAnnotationsInType = loadTypeAnnotations(type)