diff --git a/libraries/stdlib/src/kotlin/collections/MutableCollections.kt b/libraries/stdlib/src/kotlin/collections/MutableCollections.kt index 83525fbac18..7ae71903e04 100644 --- a/libraries/stdlib/src/kotlin/collections/MutableCollections.kt +++ b/libraries/stdlib/src/kotlin/collections/MutableCollections.kt @@ -39,6 +39,14 @@ public inline fun <@kotlin.internal.OnlyInputTypes T> MutableCollection.r public inline fun <@kotlin.internal.OnlyInputTypes T> MutableCollection.retainAll(elements: Collection): Boolean = @Suppress("UNCHECKED_CAST") (this as MutableCollection).retainAll(elements) +/** + * Removes the element at the specified [index] from this list. + * In Kotlin one should use the [MutableList.removeAt] function instead. + */ +@Deprecated("Use removeAt(index) instead.", ReplaceWith("removeAt(index)"), level = DeprecationLevel.ERROR) +@kotlin.internal.InlineOnly +public inline fun MutableList.remove(index: Int): T = removeAt(index) + /** * Adds the specified [element] to this mutable collection. */