Annotate Iterable.forEach and Map.forEach with HidesMembers.

#KT-10538 Fixed
#KT-10479 Fixed
This commit is contained in:
Ilya Gorbunov
2016-01-16 00:05:21 +03:00
parent 133155f4cc
commit 3d5e415c87
3 changed files with 3 additions and 0 deletions
@@ -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)
} }
+1
View File
@@ -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 {
""" """