From c0af93f2371472b5d63bd1a6913cc3ba4253ba72 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Tue, 9 Oct 2012 18:44:56 +0400 Subject: [PATCH] orEmpty() for Array fixed --- libraries/stdlib/src/kotlin/Arrays.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/stdlib/src/kotlin/Arrays.kt b/libraries/stdlib/src/kotlin/Arrays.kt index 895c41e234f..63ddb61e49b 100644 --- a/libraries/stdlib/src/kotlin/Arrays.kt +++ b/libraries/stdlib/src/kotlin/Arrays.kt @@ -7,7 +7,7 @@ public inline fun Array.notEmpty() : Boolean = !this.isEmpty() public inline fun Array.isEmpty() : Boolean = this.size == 0 /** Returns the array if its not null or else returns an empty array */ -public inline fun Array?.orEmpty() : Array = if (this != null) this else array() +public inline fun Array?.orEmpty() : Array = if (this != null) this else array() public inline val BooleanArray.lastIndex : Int get() = this.size - 1