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