aboutsummaryrefslogtreecommitdiff
path: root/subprojects/analysis-java-psi/src
diff options
context:
space:
mode:
Diffstat (limited to 'subprojects/analysis-java-psi/src')
-rw-r--r--subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/DokkaPsiParser.kt4
1 files changed, 3 insertions, 1 deletions
diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/DokkaPsiParser.kt b/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/DokkaPsiParser.kt
index 45f44338..a1f9cef0 100644
--- a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/DokkaPsiParser.kt
+++ b/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/DokkaPsiParser.kt
@@ -567,8 +567,10 @@ internal class DokkaPsiParser(
private fun getVariance(type: PsiWildcardType): Projection = when {
+ type.isExtends -> Covariance(getBound(type.extendsBound))
+ type.isSuper -> Contravariance(getBound(type.superBound))
+ // If the type isn't explicitly bounded, it still has an implicit `extends Object` bound
type.extendsBound != PsiType.NULL -> Covariance(getBound(type.extendsBound))
- type.superBound != PsiType.NULL -> Contravariance(getBound(type.superBound))
else -> throw IllegalStateException("${type.presentableText} has incorrect bounds")
}