aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/links
diff options
context:
space:
mode:
authorPaweł Marks <pmarks@virtuslab.com>2020-02-12 13:49:28 +0100
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-02-12 15:12:09 +0100
commitbca6d8c524a4c1a8174e1e2e301b3cd32d5e8fd4 (patch)
tree40d436c60f368feb0f76e47bce1f022f3b6e67cb /core/src/main/kotlin/links
parentc770225d5f89535ae5651c422c52633473751364 (diff)
downloaddokka-bca6d8c524a4c1a8174e1e2e301b3cd32d5e8fd4.tar.gz
dokka-bca6d8c524a4c1a8174e1e2e301b3cd32d5e8fd4.tar.bz2
dokka-bca6d8c524a4c1a8174e1e2e301b3cd32d5e8fd4.zip
Fixes infinite recursion bug for immediate nullable self types
Diffstat (limited to 'core/src/main/kotlin/links')
-rw-r--r--core/src/main/kotlin/links/DRI.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/main/kotlin/links/DRI.kt b/core/src/main/kotlin/links/DRI.kt
index c13eb04c..b7e5dd1c 100644
--- a/core/src/main/kotlin/links/DRI.kt
+++ b/core/src/main/kotlin/links/DRI.kt
@@ -72,7 +72,7 @@ sealed class TypeReference {
companion object {
fun from(d: ReceiverParameterDescriptor): TypeReference? =
when (d.value) {
- is ExtensionReceiver -> from(d.type)
+ is ExtensionReceiver -> fromPossiblyNullable(d.type)
else -> run {
println("Unknown value type for $d")
null
@@ -80,7 +80,7 @@ sealed class TypeReference {
}
fun from(d: ValueParameterDescriptor): TypeReference? =
- from(d.type)
+ fromPossiblyNullable(d.type)
private fun fromPossiblyNullable(t: KotlinType, self: KotlinType? = null): TypeReference =
from(t, self).let { if (t.isMarkedNullable) Nullable(it) else it }