Qualify replacement expression with receiver to workaround KT-42874

This commit is contained in:
Ilya Gorbunov
2020-11-09 22:54:36 +03:00
parent e0655b2f96
commit 4767696840
13 changed files with 333 additions and 333 deletions
@@ -181,7 +181,7 @@ public inline fun <K, V> Map<out K, V>.forEach(action: (Map.Entry<K, V>) -> Unit
for (element in this) action(element)
}
@Deprecated("Use maxByOrNull instead.", ReplaceWith("maxByOrNull(selector)"))
@Deprecated("Use maxByOrNull instead.", ReplaceWith("this.maxByOrNull(selector)"))
@DeprecatedSinceKotlin(warningSince = "1.4")
@kotlin.internal.InlineOnly
public inline fun <K, V, R : Comparable<R>> Map<out K, V>.maxBy(selector: (Map.Entry<K, V>) -> R): Map.Entry<K, V>? {
@@ -311,7 +311,7 @@ public inline fun <K, V, R> Map<out K, V>.maxOfWithOrNull(comparator: Comparator
return entries.maxOfWithOrNull(comparator, selector)
}
@Deprecated("Use maxWithOrNull instead.", ReplaceWith("maxWithOrNull(comparator)"))
@Deprecated("Use maxWithOrNull instead.", ReplaceWith("this.maxWithOrNull(comparator)"))
@DeprecatedSinceKotlin(warningSince = "1.4")
@kotlin.internal.InlineOnly
public inline fun <K, V> Map<out K, V>.maxWith(comparator: Comparator<in Map.Entry<K, V>>): Map.Entry<K, V>? {
@@ -327,7 +327,7 @@ public inline fun <K, V> Map<out K, V>.maxWithOrNull(comparator: Comparator<in M
return entries.maxWithOrNull(comparator)
}
@Deprecated("Use minByOrNull instead.", ReplaceWith("minByOrNull(selector)"))
@Deprecated("Use minByOrNull instead.", ReplaceWith("this.minByOrNull(selector)"))
@DeprecatedSinceKotlin(warningSince = "1.4")
public inline fun <K, V, R : Comparable<R>> Map<out K, V>.minBy(selector: (Map.Entry<K, V>) -> R): Map.Entry<K, V>? {
return minByOrNull(selector)
@@ -456,7 +456,7 @@ public inline fun <K, V, R> Map<out K, V>.minOfWithOrNull(comparator: Comparator
return entries.minOfWithOrNull(comparator, selector)
}
@Deprecated("Use minWithOrNull instead.", ReplaceWith("minWithOrNull(comparator)"))
@Deprecated("Use minWithOrNull instead.", ReplaceWith("this.minWithOrNull(comparator)"))
@DeprecatedSinceKotlin(warningSince = "1.4")
public fun <K, V> Map<out K, V>.minWith(comparator: Comparator<in Map.Entry<K, V>>): Map.Entry<K, V>? {
return minWithOrNull(comparator)