Fix "Placing function type parameters after the function name" errors in project

This commit is contained in:
Yan Zhulanow
2015-11-24 18:21:13 +03:00
parent 87799e9b6b
commit 278f1cd6ef
21 changed files with 46 additions and 46 deletions
@@ -39,7 +39,7 @@ public fun <T> Collection<T>?.concat(collection: Collection<T>): Collection<T>?
return result
}
public fun concatInOrder<T>(c1: Collection<T>?, c2: Collection<T>?): Collection<T> {
public fun <T> concatInOrder(c1: Collection<T>?, c2: Collection<T>?): Collection<T> {
val result = if (c1 == null || c1.isEmpty())
c2
else if (c2 == null || c2.isEmpty())
@@ -53,7 +53,7 @@ public fun concatInOrder<T>(c1: Collection<T>?, c2: Collection<T>?): Collection<
return result ?: emptySet()
}
public inline fun getFromAllScopes<Scope, T>(scopes: Array<out Scope>, callback: (Scope) -> Collection<T>): Collection<T> {
public inline fun <Scope, T> getFromAllScopes(scopes: Array<out Scope>, callback: (Scope) -> Collection<T>): Collection<T> {
if (scopes.isEmpty()) return emptySet()
var result: Collection<T>? = null
for (scope in scopes) {
@@ -62,7 +62,7 @@ public inline fun getFromAllScopes<Scope, T>(scopes: Array<out Scope>, callback:
return result ?: emptySet()
}
public inline fun getFirstMatch<Scope, T : Any>(scopes: Array<out Scope>, callback: (Scope) -> T?): T? {
public inline fun <Scope, T : Any> getFirstMatch(scopes: Array<out Scope>, callback: (Scope) -> T?): T? {
// NOTE: This is performance-sensitive; please don't replace with map().firstOrNull()
for (scope in scopes) {
val result = callback(scope)