Introduce MemberScope::classifierNames and some implementations

It aims to help with further optimizations
This commit is contained in:
Denis Zharkov
2017-08-15 17:50:37 +07:00
parent 1b255b4ed0
commit cd3edfc5b2
17 changed files with 59 additions and 2 deletions
@@ -138,3 +138,11 @@ fun <T, C : MutableCollection<in T>> Iterable<Iterable<T>>.flattenTo(c: C): C {
}
return c
}
inline fun <T, R, C : MutableCollection<in R>> Iterable<T>.flatMapToNullable(destination: C, transform: (T) -> Iterable<R>?): C? {
for (element in this) {
val list = transform(element) ?: return null
destination.addAll(list)
}
return destination
}