Fix for KT-13695, KT-13159 J2K: Invalid conversion context setup for plain text pastes

Extending, Implementing, imports from paste target file previously not implemented
This commit is contained in:
Simon Ogorodnik
2016-10-19 16:12:12 +03:00
parent b802ca0af5
commit f8b7ce1011
12 changed files with 170 additions and 30 deletions
@@ -121,3 +121,7 @@ inline fun <T> Iterable<T>.sumByLong(selector: (T) -> Long): Long {
}
return sum
}
inline fun <T, C : Collection<T>, O> C.ifNotEmpty(body: C.() -> O?): O? = if (isNotEmpty()) this.body() else null
inline fun <T, O> Array<out T>.ifNotEmpty(body: Array<out T>.() -> O?): O? = if (isNotEmpty()) this.body() else null