diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt index 9ca8cdde..54bd793c 100644 --- a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt +++ b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt @@ -554,28 +554,28 @@ private class DokkaDescriptorVisitor( getDocumentation()?.toSourceSetDependent() ?: emptyMap() private fun ClassDescriptor.resolveClassDescriptionData(): ClassInfo { - tailrec fun processSuperClasses( + tailrec fun buildInheritanceInformation( inheritorClass: ClassDescriptor?, interfaces: List<ClassDescriptor>, level: Int = 0, - inheritanceTree: Set<InheritanceLevel> = emptySet() + inheritanceInformation: Set<InheritanceLevel> = emptySet() ): Set<InheritanceLevel> { - if (inheritorClass == null && interfaces.isEmpty()) return inheritanceTree + if (inheritorClass == null && interfaces.isEmpty()) return inheritanceInformation - val updatedTree = inheritanceTree + InheritanceLevel( + val updated = inheritanceInformation + InheritanceLevel( level, inheritorClass?.let { DRI.from(it) }, interfaces.map { DRI.from(it) }) val superInterfacesFromClass = inheritorClass?.getSuperInterfaces().orEmpty() - return processSuperClasses( + return buildInheritanceInformation( inheritorClass = inheritorClass?.getSuperClassNotAny(), interfaces = interfaces.flatMap { it.getSuperInterfaces() } + superInterfacesFromClass, level = level + 1, - inheritanceTree = updatedTree + inheritanceInformation = updated ) } return ClassInfo( - processSuperClasses(getSuperClassNotAny(), getSuperInterfaces()).sortedBy { it.level }, + buildInheritanceInformation(getSuperClassNotAny(), getSuperInterfaces()).sortedBy { it.level }, resolveDescriptorData() ) } |