diff options
author | Ignat Beresnev <ignat.beresnev@jetbrains.com> | 2022-08-30 13:27:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-30 13:27:59 +0200 |
commit | a4bccbf8920a2f6f5fcf5bdf1f201d1129a05b62 (patch) | |
tree | 9856dd2958398f8a675b4e7205c2f239550cea8e /plugins/base/src/main/kotlin/translators/psi | |
parent | e68eea63f2affbacf69af041252bad4444fc812f (diff) | |
download | dokka-a4bccbf8920a2f6f5fcf5bdf1f201d1129a05b62.tar.gz dokka-a4bccbf8920a2f6f5fcf5bdf1f201d1129a05b62.tar.bz2 dokka-a4bccbf8920a2f6f5fcf5bdf1f201d1129a05b62.zip |
Handle `PsiImmediateClassType` as `PsiClassType` to resolve bounds (#2647)
Fixes #2646
Diffstat (limited to 'plugins/base/src/main/kotlin/translators/psi')
-rw-r--r-- | plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt index 1fbe06f7..58524479 100644 --- a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt +++ b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt @@ -513,7 +513,7 @@ class DefaultPsiToDocumentableTranslator( } return when (type) { - is PsiClassReferenceType -> + is PsiClassType -> type.resolve()?.let { resolved -> when { resolved.qualifiedName == "java.lang.Object" -> type.cacheBoundIfHasNoAnnotation { annotations -> JavaObject(annotations.annotations()) } @@ -564,8 +564,6 @@ class DefaultPsiToDocumentableTranslator( is PsiPrimitiveType -> if (type.name == "void") Void else type.cacheBoundIfHasNoAnnotation { annotations -> PrimitiveJavaType(type.name, annotations.annotations()) } - is PsiImmediateClassType -> - type.cacheBoundIfHasNoAnnotation { annotations -> JavaObject(annotations.annotations()) } else -> throw IllegalStateException("${type.presentableText} is not supported by PSI parser") } } |