aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/links
diff options
context:
space:
mode:
authorBłażej Kardyś <bkardys@virtuslab.com>2020-03-24 05:04:10 +0100
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-03-25 12:40:43 +0100
commit646d2fbd2a0d1e898a14ac942c43511bfd0a1c95 (patch)
tree3b1a4dad8129f2772c17eb4a1fb1436fd0f33abf /core/src/main/kotlin/links
parentc09bde34ff729ef9b1f3bea602fb53cd4e6dca42 (diff)
downloaddokka-646d2fbd2a0d1e898a14ac942c43511bfd0a1c95.tar.gz
dokka-646d2fbd2a0d1e898a14ac942c43511bfd0a1c95.tar.bz2
dokka-646d2fbd2a0d1e898a14ac942c43511bfd0a1c95.zip
Fixing incorrect psi parsing
Diffstat (limited to 'core/src/main/kotlin/links')
-rw-r--r--core/src/main/kotlin/links/DRI.kt4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/main/kotlin/links/DRI.kt b/core/src/main/kotlin/links/DRI.kt
index cc78ab6f..abc88939 100644
--- a/core/src/main/kotlin/links/DRI.kt
+++ b/core/src/main/kotlin/links/DRI.kt
@@ -57,6 +57,7 @@ data class DRI(
}
val DriOfUnit = DRI("kotlin", "Unit")
+val DriOfAny = DRI("kotlin", "Any")
fun DRI.withClass(name: String) = copy(classNames = if (classNames.isNullOrBlank()) name else "$classNames.$name")
@@ -111,6 +112,8 @@ sealed class TypeReference {
fun from(d: ValueParameterDescriptor): TypeReference? =
fromPossiblyNullable(d.type)
+ fun from(p: PsiClass) = TypeReference
+
private fun fromPossiblyNullable(t: KotlinType, self: KotlinType? = null): TypeReference =
from(t, self).let { if (t.isMarkedNullable) Nullable(it) else it }
@@ -127,7 +130,6 @@ sealed class TypeReference {
)
}
-
private fun fromProjection(t: TypeProjection, r: KotlinType? = null): TypeReference =
if (t.isStarProjection) {
StarProjection