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
@@ -21,9 +21,6 @@
package kotlin.collections
/** Returns the array if it's not `null`, or an empty array otherwise. */
public inline fun <reified T> Array<out T>?.orEmpty(): Array<out T> = this ?: arrayOf<T>()
/**
* Returns a single list of all elements from all arrays in the given array.
@@ -23,6 +23,9 @@ package kotlin.collections
import java.nio.charset.Charset
/** Returns the array if it's not `null`, or an empty array otherwise. */
public inline fun <reified T> Array<out T>?.orEmpty(): Array<out T> = this ?: arrayOf<T>()
/**
* Converts the contents of this byte array to a string using the specified [charset].
*/