diff options
-rw-r--r-- | plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt index 38a583d7..791627cc 100644 --- a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt +++ b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt @@ -132,16 +132,15 @@ class DefaultPsiToDocumentableTranslator( fun parseSupertypes(superTypes: Array<PsiClassType>, level: Int = 0) { if (superTypes.isEmpty()) return val parsedClasses = superTypes.filter { !it.shouldBeIgnored }.mapNotNull { psi -> - psi.resolve()?.let { - when { - it.isInterface -> DRI.from(it) to JavaClassKindTypes.INTERFACE - else -> DRI.from(it) to JavaClassKindTypes.CLASS - }?.let { - TypeConstructor( - it.first, - psi.parameters.map(::getProjection) - ) to it.second + psi.resolve()?.let { psiClass -> + val (dri, javaClassKind) = when { + psiClass.isInterface -> DRI.from(psiClass) to JavaClassKindTypes.INTERFACE + else -> DRI.from(psiClass) to JavaClassKindTypes.CLASS } + TypeConstructor( + dri, + psi.parameters.map(::getProjection) + ) to javaClassKind } } val (classes, interfaces) = parsedClasses.partition { it.second == JavaClassKindTypes.CLASS } |