diff options
author | Vadim Mishenev <vad-mishenev@yandex.ru> | 2022-02-21 23:06:59 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-21 23:06:59 +0300 |
commit | c44bf5487bd32f90a4576859548f1db0e9355a07 (patch) | |
tree | 2954c68d9247007ecc255d397fb207b1cb2d1be1 /plugins/base/src/main/kotlin/transformers/pages/merger | |
parent | f54597c754c9be6afb4ea374dc959dcc9fd551ce (diff) | |
download | dokka-c44bf5487bd32f90a4576859548f1db0e9355a07.tar.gz dokka-c44bf5487bd32f90a4576859548f1db0e9355a07.tar.bz2 dokka-c44bf5487bd32f90a4576859548f1db0e9355a07.zip |
Add option to merge implicit expect-actual declarations (#2316)
* Add option to merge implicit expect-actual declarations
* Merge entries, constructors
* Fix StdLib integration test
* Add doc
Diffstat (limited to 'plugins/base/src/main/kotlin/transformers/pages/merger')
-rw-r--r-- | plugins/base/src/main/kotlin/transformers/pages/merger/SameMethodNamePageMergerStrategy.kt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/base/src/main/kotlin/transformers/pages/merger/SameMethodNamePageMergerStrategy.kt b/plugins/base/src/main/kotlin/transformers/pages/merger/SameMethodNamePageMergerStrategy.kt index 2fb70fc8..6c12c719 100644 --- a/plugins/base/src/main/kotlin/transformers/pages/merger/SameMethodNamePageMergerStrategy.kt +++ b/plugins/base/src/main/kotlin/transformers/pages/merger/SameMethodNamePageMergerStrategy.kt @@ -23,7 +23,7 @@ class SameMethodNamePageMergerStrategy(val logger: DokkaLogger) : PageMergerStra children = members.flatMap { it.children }.distinct(), content = squashDivergentInstances(members).withSourceSets(members.allSourceSets()), embeddedResources = members.flatMap { it.embeddedResources }.distinct(), - documentable = null + documentables = members.flatMap { it.documentables } ) return (pages - members) + listOf(merged) @@ -37,9 +37,9 @@ class SameMethodNamePageMergerStrategy(val logger: DokkaLogger) : PageMergerStra .reduce { acc, node -> acc.mapTransform<ContentDivergentGroup, ContentNode> { g -> g.copy(children = (g.children + - (node.dfs { it is ContentDivergentGroup && it.groupID == g.groupID } as? ContentDivergentGroup) - ?.children?.single() - ).filterNotNull() + ((node.dfs { it is ContentDivergentGroup && it.groupID == g.groupID } as? ContentDivergentGroup) + ?.children ?: emptyList()) + ) ) } } |