diff options
author | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-11-21 19:46:20 +0300 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-11-21 19:46:20 +0300 |
commit | 454b4a4c8490a04fcfe17309596c6316cd321113 (patch) | |
tree | 276b1c554b07208d9e024aff1d233044b3378046 /core/src | |
parent | 46af59cc658e4f56b6d2909ab4dc93f43af77dc2 (diff) | |
download | dokka-454b4a4c8490a04fcfe17309596c6316cd321113.tar.gz dokka-454b4a4c8490a04fcfe17309596c6316cd321113.tar.bz2 dokka-454b4a4c8490a04fcfe17309596c6316cd321113.zip |
Fix suppressing of companion when it implements some interface
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/main/kotlin/Kotlin/DocumentationBuilder.kt | 3 | ||||
-rw-r--r-- | core/src/test/kotlin/format/MarkdownFormatTest.kt | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt index 24840a9d..0f6f217e 100644 --- a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt +++ b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt @@ -575,7 +575,8 @@ class DocumentationBuilder ClassMember(it, inheritedLinkKind = RefKind.InheritedCompanionObjectMember) } - if (companionObjectDescriptor.getAllSuperclassesWithoutAny().isNotEmpty()) { + if (companionObjectDescriptor.getAllSuperclassesWithoutAny().isNotEmpty() + || companionObjectDescriptor.getSuperInterfaces().isNotEmpty()) { result += ClassMember(companionObjectDescriptor) } } diff --git a/core/src/test/kotlin/format/MarkdownFormatTest.kt b/core/src/test/kotlin/format/MarkdownFormatTest.kt index f572922c..d2ab5b5c 100644 --- a/core/src/test/kotlin/format/MarkdownFormatTest.kt +++ b/core/src/test/kotlin/format/MarkdownFormatTest.kt @@ -396,6 +396,10 @@ class MarkdownFormatTest { verifyMarkdownNodeByName("notPublishedTypeAliasAutoExpansion", "foo", includeNonPublic = false) } + @Test fun companionImplements() { + verifyMarkdownNodeByName("companionImplements", "Foo") + } + private fun buildMultiplePlatforms(path: String): DocumentationModule { val module = DocumentationModule("test") val options = DocumentationOptions("", "html", generateIndexPages = false, noStdlibLink = true) |