Get rid of platform differences in Array.orEmpty() doc
This commit is contained in:
committed by
Space
parent
cc3c33b8ae
commit
91d1baf3b5
@@ -8,7 +8,10 @@ package kotlin.collections
|
||||
import kotlin.comparisons.naturalOrder
|
||||
import kotlin.random.Random
|
||||
|
||||
/** Returns the array if it's not `null`, or an empty array otherwise. */
|
||||
/**
|
||||
* Returns the array if it's not `null`, or an empty array otherwise.
|
||||
* @sample samples.collections.Arrays.Usage.arrayOrEmpty
|
||||
*/
|
||||
@kotlin.internal.InlineOnly
|
||||
public actual inline fun <T> Array<out T>?.orEmpty(): Array<out T> = this ?: emptyArray<T>()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user