Do not require array extensions being reified to create new array.

#KT-15377
This commit is contained in:
Ilya Gorbunov
2016-12-23 20:25:17 +03:00
parent 510295475b
commit 05dcaccf09
5 changed files with 12 additions and 5 deletions
@@ -143,6 +143,10 @@ header abstract class AbstractMutableList<E> : MutableList<E> {
// From collections.kt
/** Returns the array if it's not `null`, or an empty array otherwise. */
header inline fun <reified T> Array<out T>?.orEmpty(): Array<out T>
header inline fun <reified T> Collection<T>.toTypedArray(): Array<T>
header fun <T : Comparable<T>> MutableList<T>.sort(): Unit