diff --git a/libraries/stdlib/src/generated/_Maps.kt b/libraries/stdlib/src/generated/_Maps.kt index 967ba92acfd..3e7c8680731 100644 --- a/libraries/stdlib/src/generated/_Maps.kt +++ b/libraries/stdlib/src/generated/_Maps.kt @@ -52,6 +52,7 @@ public inline fun Map.map(transform: (Map.Entry) -> R): Li * Applies the given [transform] function to each entry and its index in the original map * and appends the results to the given [destination]. */ +@Deprecated("Use entries.mapIndexedTo instead.", ReplaceWith("this.entries.mapIndexedTo(destination, transform)")) public inline fun > Map.mapIndexedTo(destination: C, transform: (Int, Map.Entry) -> R): C { var index = 0 for (item in this) diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/Mapping.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/Mapping.kt index f1b75178403..e00d6bcd63f 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/Mapping.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/Mapping.kt @@ -178,6 +178,7 @@ fun mapping(): List { """ } deprecate(Strings) { forBinaryCompatibility } + deprecate(Maps) { Deprecation("Use entries.mapIndexedTo instead.", replaceWith = "this.entries.mapIndexedTo(destination, transform)") } include(Maps, CharSequences, Strings) }