aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/translators/psi
diff options
context:
space:
mode:
authorKamil Doległo <9080183+kamildoleglo@users.noreply.github.com>2021-04-06 15:34:39 +0200
committerGitHub <noreply@github.com>2021-04-06 15:34:39 +0200
commit6b2e9382a298045c1d3c39bdb3c33cdc0eebf38d (patch)
tree978d2cac1d7cd91f322fff2da8186797aadde5b9 /plugins/base/src/main/kotlin/translators/psi
parent6756bad5e9d5ebd996275e17bc3ea4f07aea54f4 (diff)
downloaddokka-6b2e9382a298045c1d3c39bdb3c33cdc0eebf38d.tar.gz
dokka-6b2e9382a298045c1d3c39bdb3c33cdc0eebf38d.tar.bz2
dokka-6b2e9382a298045c1d3c39bdb3c33cdc0eebf38d.zip
Fix some compiler warnings (#1812)
Diffstat (limited to 'plugins/base/src/main/kotlin/translators/psi')
-rw-r--r--plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt
index 14d57df0..84510824 100644
--- a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt
+++ b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt
@@ -172,15 +172,15 @@ class DefaultPsiToDocumentableTranslator(
methods.asIterable().parallelForEach { superMethodsKeys.add(it.hash) }
fun parseSupertypes(superTypes: Array<PsiClassType>, level: Int = 0) { // TODO: Rewrite it
if (superTypes.isEmpty()) return
- val parsedClasses = superTypes.filter { !it.shouldBeIgnored }.mapNotNull { psi ->
- psi.resolve()?.let { psiClass ->
- val (dri, javaClassKind) = when {
- psiClass.isInterface -> DRI.from(psiClass) to JavaClassKindTypes.INTERFACE
- else -> DRI.from(psiClass) to JavaClassKindTypes.CLASS
+ val parsedClasses = superTypes.filter { !it.shouldBeIgnored }.mapNotNull { supertypePsi ->
+ supertypePsi.resolve()?.let { supertypePsiClass ->
+ val (supertypeDri, javaClassKind) = when {
+ supertypePsiClass.isInterface -> DRI.from(supertypePsiClass) to JavaClassKindTypes.INTERFACE
+ else -> DRI.from(supertypePsiClass) to JavaClassKindTypes.CLASS
}
GenericTypeConstructor(
- dri,
- psi.parameters.map(::getProjection)
+ supertypeDri,
+ supertypePsi.parameters.map(::getProjection)
) to javaClassKind
}
}