aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin
diff options
context:
space:
mode:
authorPaweł Marks <pmarks@virtuslab.com>2020-02-18 12:40:54 +0100
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-02-18 13:28:23 +0100
commitf0d84fb8947ce4e5aa6796787bbc3131689ecf6a (patch)
tree33b049f0e281ab88d3223dedb8ceecfa6b5e7262 /plugins/base/src/main/kotlin
parent6a4eda715f59106530f5f6078ff2c93e49079ac6 (diff)
downloaddokka-f0d84fb8947ce4e5aa6796787bbc3131689ecf6a.tar.gz
dokka-f0d84fb8947ce4e5aa6796787bbc3131689ecf6a.tar.bz2
dokka-f0d84fb8947ce4e5aa6796787bbc3131689ecf6a.zip
Remove unnecesarily complex utility
Diffstat (limited to 'plugins/base/src/main/kotlin')
-rw-r--r--plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt5
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt b/plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt
index f2e6f177..6b612733 100644
--- a/plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt
+++ b/plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt
@@ -5,7 +5,6 @@ import org.jetbrains.dokka.model.Enum
import org.jetbrains.dokka.model.Function
import org.jetbrains.dokka.plugability.DokkaContext
import org.jetbrains.dokka.transformers.documentation.DocumentableMerger
-import org.jetbrains.dokka.utilities.pullOutNull
internal object DefaultDocumentableMerger : DocumentableMerger {
override fun invoke(modules: Collection<Module>, context: DokkaContext): Module {
@@ -51,7 +50,7 @@ fun Function.mergeWith(other: Function): Function = Function(
name,
returnType,
isConstructor,
- (receiver to other.receiver).pullOutNull()?.let { (f, s) -> f.mergeWith(s) },
+ other.receiver?.let { receiver?.mergeWith(it) },
merge(parameters + other.parameters, Parameter::mergeWith),
expected?.mergeWith(other.expected),
(actual + other.actual).merge(),
@@ -61,7 +60,7 @@ fun Function.mergeWith(other: Function): Function = Function(
fun Property.mergeWith(other: Property) = Property(
dri,
name,
- (receiver to other.receiver).pullOutNull()?.let { (f, s) -> f.mergeWith(s) },
+ other.receiver?.let { receiver?.mergeWith(it) },
expected?.mergeWith(other.expected),
(actual + other.actual).merge(),
accessors = (this.accessors + other.accessors).distinct(),