From c8caed5b6f6892138974f0e6ca012a06a9c8c55d Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Tue, 23 Oct 2018 20:33:09 +0300 Subject: [PATCH] Duplicate MutableList.add docs in AbstractMutableList.add Because the documentation inheritance doesn't work as desired here. --- .../common/src/kotlin/collections/AbstractMutableList.kt | 5 +++++ .../stdlib/js/src/kotlin/collections/AbstractMutableList.kt | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/libraries/stdlib/common/src/kotlin/collections/AbstractMutableList.kt b/libraries/stdlib/common/src/kotlin/collections/AbstractMutableList.kt index 515fc4775b9..3864de20db9 100644 --- a/libraries/stdlib/common/src/kotlin/collections/AbstractMutableList.kt +++ b/libraries/stdlib/common/src/kotlin/collections/AbstractMutableList.kt @@ -22,6 +22,11 @@ expect abstract class AbstractMutableList : MutableList { // From MutableList + /** + * Adds the specified element to the end of this list. + * + * @return `true` because the list is always modified as the result of this operation. + */ override fun add(element: E): Boolean override fun remove(element: E): Boolean override fun addAll(elements: Collection): Boolean diff --git a/libraries/stdlib/js/src/kotlin/collections/AbstractMutableList.kt b/libraries/stdlib/js/src/kotlin/collections/AbstractMutableList.kt index 11278919d17..cef22961017 100644 --- a/libraries/stdlib/js/src/kotlin/collections/AbstractMutableList.kt +++ b/libraries/stdlib/js/src/kotlin/collections/AbstractMutableList.kt @@ -22,6 +22,11 @@ public actual abstract class AbstractMutableList protected actual constructor abstract override fun removeAt(index: Int): E abstract override fun set(index: Int, element: E): E + /** + * Adds the specified element to the end of this list. + * + * @return `true` because the list is always modified as the result of this operation. + */ actual override fun add(element: E): Boolean { add(size, element) return true