Annotate Iterable.forEach and Map.forEach with HidesMembers.
#KT-10538 Fixed #KT-10479 Fixed
This commit is contained in:
@@ -1391,6 +1391,7 @@ public inline fun <T, R> List<T>.foldRight(initial: R, operation: (T, R) -> R):
|
|||||||
/**
|
/**
|
||||||
* Performs the given [action] on each element.
|
* Performs the given [action] on each element.
|
||||||
*/
|
*/
|
||||||
|
@kotlin.internal.HidesMembers
|
||||||
public inline fun <T> Iterable<T>.forEach(action: (T) -> Unit): Unit {
|
public inline fun <T> Iterable<T>.forEach(action: (T) -> Unit): Unit {
|
||||||
for (element in this) action(element)
|
for (element in this) action(element)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -130,6 +130,7 @@ public inline fun <K, V> Map<K, V>.count(predicate: (Map.Entry<K, V>) -> Boolean
|
|||||||
/**
|
/**
|
||||||
* Performs the given [action] on each entry.
|
* Performs the given [action] on each entry.
|
||||||
*/
|
*/
|
||||||
|
@kotlin.internal.HidesMembers
|
||||||
public inline fun <K, V> Map<K, V>.forEach(action: (Map.Entry<K, V>) -> Unit): Unit {
|
public inline fun <K, V> Map<K, V>.forEach(action: (Map.Entry<K, V>) -> Unit): Unit {
|
||||||
for (element in this) action(element)
|
for (element in this) action(element)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -493,6 +493,7 @@ fun aggregates(): List<GenericFunction> {
|
|||||||
inline(true)
|
inline(true)
|
||||||
|
|
||||||
doc { f -> "Performs the given [action] on each ${f.element}." }
|
doc { f -> "Performs the given [action] on each ${f.element}." }
|
||||||
|
annotations(Iterables, Maps) { "@kotlin.internal.HidesMembers" }
|
||||||
returns("Unit")
|
returns("Unit")
|
||||||
body {
|
body {
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user