diff --git a/libraries/stdlib/src/generated/_Arrays.kt b/libraries/stdlib/src/generated/_Arrays.kt index 865fb7060a6..db192876db3 100644 --- a/libraries/stdlib/src/generated/_Arrays.kt +++ b/libraries/stdlib/src/generated/_Arrays.kt @@ -9033,136 +9033,6 @@ public fun Array.requireNoNulls(): Array { return this as Array } -@Deprecated("Use zip() with transform instead.", ReplaceWith("zip(array, transform)")) -public inline fun Array.merge(array: Array, transform: (T, R) -> V): List { - return zip(array, transform) -} - -@Deprecated("Use zip() with transform instead.", ReplaceWith("zip(array, transform)")) -public inline fun BooleanArray.merge(array: Array, transform: (Boolean, R) -> V): List { - return zip(array, transform) -} - -@Deprecated("Use zip() with transform instead.", ReplaceWith("zip(array, transform)")) -public inline fun ByteArray.merge(array: Array, transform: (Byte, R) -> V): List { - return zip(array, transform) -} - -@Deprecated("Use zip() with transform instead.", ReplaceWith("zip(array, transform)")) -public inline fun CharArray.merge(array: Array, transform: (Char, R) -> V): List { - return zip(array, transform) -} - -@Deprecated("Use zip() with transform instead.", ReplaceWith("zip(array, transform)")) -public inline fun DoubleArray.merge(array: Array, transform: (Double, R) -> V): List { - return zip(array, transform) -} - -@Deprecated("Use zip() with transform instead.", ReplaceWith("zip(array, transform)")) -public inline fun FloatArray.merge(array: Array, transform: (Float, R) -> V): List { - return zip(array, transform) -} - -@Deprecated("Use zip() with transform instead.", ReplaceWith("zip(array, transform)")) -public inline fun IntArray.merge(array: Array, transform: (Int, R) -> V): List { - return zip(array, transform) -} - -@Deprecated("Use zip() with transform instead.", ReplaceWith("zip(array, transform)")) -public inline fun LongArray.merge(array: Array, transform: (Long, R) -> V): List { - return zip(array, transform) -} - -@Deprecated("Use zip() with transform instead.", ReplaceWith("zip(array, transform)")) -public inline fun ShortArray.merge(array: Array, transform: (Short, R) -> V): List { - return zip(array, transform) -} - -@Deprecated("Use zip() with transform instead.", ReplaceWith("zip(array, transform)")) -public inline fun BooleanArray.merge(array: BooleanArray, transform: (Boolean, Boolean) -> V): List { - return zip(array, transform) -} - -@Deprecated("Use zip() with transform instead.", ReplaceWith("zip(array, transform)")) -public inline fun ByteArray.merge(array: ByteArray, transform: (Byte, Byte) -> V): List { - return zip(array, transform) -} - -@Deprecated("Use zip() with transform instead.", ReplaceWith("zip(array, transform)")) -public inline fun CharArray.merge(array: CharArray, transform: (Char, Char) -> V): List { - return zip(array, transform) -} - -@Deprecated("Use zip() with transform instead.", ReplaceWith("zip(array, transform)")) -public inline fun DoubleArray.merge(array: DoubleArray, transform: (Double, Double) -> V): List { - return zip(array, transform) -} - -@Deprecated("Use zip() with transform instead.", ReplaceWith("zip(array, transform)")) -public inline fun FloatArray.merge(array: FloatArray, transform: (Float, Float) -> V): List { - return zip(array, transform) -} - -@Deprecated("Use zip() with transform instead.", ReplaceWith("zip(array, transform)")) -public inline fun IntArray.merge(array: IntArray, transform: (Int, Int) -> V): List { - return zip(array, transform) -} - -@Deprecated("Use zip() with transform instead.", ReplaceWith("zip(array, transform)")) -public inline fun LongArray.merge(array: LongArray, transform: (Long, Long) -> V): List { - return zip(array, transform) -} - -@Deprecated("Use zip() with transform instead.", ReplaceWith("zip(array, transform)")) -public inline fun ShortArray.merge(array: ShortArray, transform: (Short, Short) -> V): List { - return zip(array, transform) -} - -@Deprecated("Use zip() with transform instead.", ReplaceWith("zip(other, transform)")) -public inline fun Array.merge(other: Iterable, transform: (T, R) -> V): List { - return zip(other, transform) -} - -@Deprecated("Use zip() with transform instead.", ReplaceWith("zip(other, transform)")) -public inline fun BooleanArray.merge(other: Iterable, transform: (Boolean, R) -> V): List { - return zip(other, transform) -} - -@Deprecated("Use zip() with transform instead.", ReplaceWith("zip(other, transform)")) -public inline fun ByteArray.merge(other: Iterable, transform: (Byte, R) -> V): List { - return zip(other, transform) -} - -@Deprecated("Use zip() with transform instead.", ReplaceWith("zip(other, transform)")) -public inline fun CharArray.merge(other: Iterable, transform: (Char, R) -> V): List { - return zip(other, transform) -} - -@Deprecated("Use zip() with transform instead.", ReplaceWith("zip(other, transform)")) -public inline fun DoubleArray.merge(other: Iterable, transform: (Double, R) -> V): List { - return zip(other, transform) -} - -@Deprecated("Use zip() with transform instead.", ReplaceWith("zip(other, transform)")) -public inline fun FloatArray.merge(other: Iterable, transform: (Float, R) -> V): List { - return zip(other, transform) -} - -@Deprecated("Use zip() with transform instead.", ReplaceWith("zip(other, transform)")) -public inline fun IntArray.merge(other: Iterable, transform: (Int, R) -> V): List { - return zip(other, transform) -} - -@Deprecated("Use zip() with transform instead.", ReplaceWith("zip(other, transform)")) -public inline fun LongArray.merge(other: Iterable, transform: (Long, R) -> V): List { - return zip(other, transform) -} - -@Deprecated("Use zip() with transform instead.", ReplaceWith("zip(other, transform)")) -public inline fun ShortArray.merge(other: Iterable, transform: (Short, R) -> V): List { - return zip(other, transform) -} - /** * Splits the original collection into pair of collections, * where *first* collection contains elements for which [predicate] yielded `true`, diff --git a/libraries/stdlib/src/generated/_Collections.kt b/libraries/stdlib/src/generated/_Collections.kt index 9c28012ae76..fbd060ec309 100644 --- a/libraries/stdlib/src/generated/_Collections.kt +++ b/libraries/stdlib/src/generated/_Collections.kt @@ -1397,16 +1397,6 @@ public fun List.requireNoNulls(): List { return this as List } -@Deprecated("Use zip() with transform instead.", ReplaceWith("zip(array, transform)")) -public inline fun Iterable.merge(array: Array, transform: (T, R) -> V): List { - return zip(array, transform) -} - -@Deprecated("Use zip() with transform instead.", ReplaceWith("zip(other, transform)")) -public inline fun Iterable.merge(other: Iterable, transform: (T, R) -> V): List { - return zip(other, transform) -} - /** * Returns a list containing all elements of the original collection except the elements contained in the given [array]. */ diff --git a/libraries/stdlib/src/generated/_Sequences.kt b/libraries/stdlib/src/generated/_Sequences.kt index a964d34c584..f3d1b3008eb 100644 --- a/libraries/stdlib/src/generated/_Sequences.kt +++ b/libraries/stdlib/src/generated/_Sequences.kt @@ -838,11 +838,6 @@ public fun Sequence.requireNoNulls(): Sequence { return map { it ?: throw IllegalArgumentException("null element found in $this.") } } -@Deprecated("Use zip() with transform instead.", ReplaceWith("zip(sequence, transform)")) -public fun Sequence.merge(sequence: Sequence, transform: (T, R) -> V): Sequence { - return zip(sequence, transform) -} - /** * Returns a sequence containing all elements of original sequence except the elements contained in the given [array]. * Note that the source sequence and the array being subtracted are iterated only when an `iterator` is requested from diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/Generators.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/Generators.kt index 6f68e52d230..c14ac53b63f 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/Generators.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/Generators.kt @@ -443,15 +443,6 @@ fun generators(): List { } } - templates add f("merge(other: Iterable, transform: (T, R) -> V)") { - exclude(Sequences, Strings) - typeParam("R") - typeParam("V") - returns("List") - inline(true) - deprecate(Deprecation("Use zip() with transform instead.", replaceWith = "zip(other, transform)")) - } - templates add f("zip(other: Iterable, transform: (T, R) -> V)") { exclude(Sequences, Strings) doc { @@ -488,15 +479,6 @@ fun generators(): List { } } - templates add f("merge(array: Array, transform: (T, R) -> V)") { - exclude(Sequences, Strings) - typeParam("R") - typeParam("V") - returns("List") - inline(true) - deprecate(Deprecation("Use zip() with transform instead.", replaceWith = "zip(array, transform)")) - } - templates add f("zip(array: Array, transform: (T, R) -> V)") { exclude(Sequences, Strings) doc { @@ -533,14 +515,6 @@ fun generators(): List { } - templates add f("merge(array: SELF, transform: (T, T) -> V)") { - only(ArraysOfPrimitives) - typeParam("V") - returns("List") - inline(true) - deprecate(Deprecation("Use zip() with transform instead.", replaceWith = "zip(array, transform)")) - } - templates add f("zip(array: SELF, transform: (T, T) -> V)") { only(ArraysOfPrimitives) doc { @@ -563,14 +537,6 @@ fun generators(): List { } } - templates add f("merge(sequence: Sequence, transform: (T, R) -> V)") { - only(Sequences) - typeParam("R") - typeParam("V") - returns("Sequence") - deprecate(Deprecation("Use zip() with transform instead.", replaceWith = "zip(sequence, transform)")) - } - templates add f("zip(sequence: Sequence, transform: (T, R) -> V)") { only(Sequences) doc {