From f0d84fb8947ce4e5aa6796787bbc3131689ecf6a Mon Sep 17 00:00:00 2001 From: Paweł Marks Date: Tue, 18 Feb 2020 12:40:54 +0100 Subject: Remove unnecesarily complex utility --- .../kotlin/transformers/documentables/DefaultDocumentableMerger.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'plugins/base/src/main/kotlin') 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, 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(), -- cgit