diff options
author | Andrzej Ratajczak <andrzej.ratajczak98@gmail.com> | 2020-08-17 08:59:34 +0200 |
---|---|---|
committer | Sebastian Sellmair <34319766+sellmair@users.noreply.github.com> | 2020-08-17 11:55:35 +0200 |
commit | 9c4dd8d13039a497bf4e93abf2f1a54b183fec93 (patch) | |
tree | 7ad33073d2a05e5d49bafb18f220917fe0bf8b18 | |
parent | 43450355b04f52d64da5b29cff3f8fca87445f5b (diff) | |
download | dokka-9c4dd8d13039a497bf4e93abf2f1a54b183fec93.tar.gz dokka-9c4dd8d13039a497bf4e93abf2f1a54b183fec93.tar.bz2 dokka-9c4dd8d13039a497bf4e93abf2f1a54b183fec93.zip |
Apply requested changes
-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 } |