Get rid of platform differences in Array.orEmpty() doc

This commit is contained in:
Abduqodiri Qurbonzoda
2021-05-31 01:58:01 +03:00
committed by Space
parent cc3c33b8ae
commit 91d1baf3b5
3 changed files with 12 additions and 3 deletions
@@ -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>()