aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2018-10-03 23:49:36 +0300
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2018-10-03 23:49:36 +0300
commit234169e34e4362e598e1cecb50f116c8c1ea74d2 (patch)
treebbf0eb24a10497d7e53cbd5bda5043ba362a983d /core
parent810fce90353f044de1531a2cf5b340ff7732b083 (diff)
downloaddokka-234169e34e4362e598e1cecb50f116c8c1ea74d2.tar.gz
dokka-234169e34e4362e598e1cecb50f116c8c1ea74d2.tar.bz2
dokka-234169e34e4362e598e1cecb50f116c8c1ea74d2.zip
Fix platform merging on group by signature in overload group
Diffstat (limited to 'core')
-rw-r--r--core/src/main/kotlin/Formats/StructuredFormatService.kt11
1 files changed, 9 insertions, 2 deletions
diff --git a/core/src/main/kotlin/Formats/StructuredFormatService.kt b/core/src/main/kotlin/Formats/StructuredFormatService.kt
index 282ea7d6..f989fad6 100644
--- a/core/src/main/kotlin/Formats/StructuredFormatService.kt
+++ b/core/src/main/kotlin/Formats/StructuredFormatService.kt
@@ -381,8 +381,15 @@ abstract class StructuredOutputBuilder(val to: StringBuilder,
private fun formatOverloadGroup(items: List<DocumentationNode>, isSingleNode: Boolean = false) {
val platformsPerGroup = samePlatforms(
- items.flatMap { if (it.kind == NodeKind.GroupNode) it.origins else listOf(it) }
- .map { effectivePlatformsForNode(it) }
+ items.flatMap {
+ if (it.kind == NodeKind.GroupNode) {
+ it.origins.groupBy { origin ->
+ languageService.render(origin)
+ }.values.map { origins -> effectivePlatformsForMembers(origins) }
+ } else {
+ listOf(effectivePlatformsForNode(it))
+ }
+ }
)
if (platformsPerGroup) {