aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/translators/psi
diff options
context:
space:
mode:
authorAndrzej Ratajczak <andrzej.ratajczak98@gmail.com>2020-08-25 14:51:53 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-08-27 17:35:04 +0200
commitb05eb93d345cccd0cae9393f99acd428012d1106 (patch)
treee5bbc7ec75b5b5034c3d6b3e7c9690a510150264 /plugins/base/src/main/kotlin/translators/psi
parent1c6dabaee7764954a9783effa7463f9866a02066 (diff)
downloaddokka-b05eb93d345cccd0cae9393f99acd428012d1106.tar.gz
dokka-b05eb93d345cccd0cae9393f99acd428012d1106.tar.bz2
dokka-b05eb93d345cccd0cae9393f99acd428012d1106.zip
Add handling for generic type parameters variance
Diffstat (limited to 'plugins/base/src/main/kotlin/translators/psi')
-rw-r--r--plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt
index c9118920..c1ed4a08 100644
--- a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt
+++ b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt
@@ -380,8 +380,8 @@ class DefaultPsiToDocumentableTranslator(
}
private fun getVariance(type: PsiWildcardType): Projection = when {
- type.extendsBound != PsiType.NULL -> Variance(Variance.Kind.Out, getBound(type.extendsBound))
- type.superBound != PsiType.NULL -> Variance(Variance.Kind.In, getBound(type.superBound))
+ type.extendsBound != PsiType.NULL -> Covariance(getBound(type.extendsBound))
+ type.superBound != PsiType.NULL -> Contravariance(getBound(type.superBound))
else -> throw IllegalStateException("${type.presentableText} has incorrect bounds")
}