Do not require array extensions being reified to create new array.
#KT-15377
This commit is contained in:
@@ -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].
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user