aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/Kotlin
diff options
context:
space:
mode:
authorSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2018-04-26 19:37:07 +0300
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2018-07-14 23:46:18 +0300
commit9539284e5dd72e2676dc5d656b78f21c1c7035ee (patch)
tree1fda7ff4daf7f10041b9d71c7ef70df4710d92d1 /core/src/main/kotlin/Kotlin
parentf8c358a6a5b269a8dcd5240db8dd14a497c261c2 (diff)
downloaddokka-9539284e5dd72e2676dc5d656b78f21c1c7035ee.tar.gz
dokka-9539284e5dd72e2676dc5d656b78f21c1c7035ee.tar.bz2
dokka-9539284e5dd72e2676dc5d656b78f21c1c7035ee.zip
KT-24109: Fix generation of superclass sequence
Diffstat (limited to 'core/src/main/kotlin/Kotlin')
-rw-r--r--core/src/main/kotlin/Kotlin/DocumentationBuilder.kt10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt
index 8fec0bfb..cb35e568 100644
--- a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt
+++ b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt
@@ -34,6 +34,7 @@ import org.jetbrains.kotlin.resolve.source.PsiSourceElement
import org.jetbrains.kotlin.resolve.source.getPsi
import org.jetbrains.kotlin.types.*
import org.jetbrains.kotlin.types.typeUtil.supertypes
+import org.jetbrains.kotlin.util.supertypesWithAny
import java.io.File
import java.nio.file.Path
import java.nio.file.Paths
@@ -645,7 +646,7 @@ class DocumentationBuilder
}
val node = nodeForDescriptor(this, kind, external)
register(this, node)
- typeConstructor.supertypes.forEach {
+ supertypesWithAnyPrecise().forEach {
node.appendSupertype(this, it, !external)
}
if (getKind() != ClassKind.OBJECT && getKind() != ClassKind.ENUM_ENTRY) {
@@ -1152,3 +1153,10 @@ fun DocumentationNode.generateAllTypesNode() {
append(allTypesNode, RefKind.Member)
}
+
+fun ClassDescriptor.supertypesWithAnyPrecise(): Collection<KotlinType> {
+ if (KotlinBuiltIns.isAny(this)) {
+ return emptyList()
+ }
+ return typeConstructor.supertypesWithAny()
+} \ No newline at end of file