From 01a03486858def64e847c079128b7af7c50426ba Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Fri, 22 May 2015 18:28:49 +0300 Subject: [PATCH] Remove deprecated size property usage from generated code. --- libraries/stdlib/src/generated/_Arrays.kt | 18 +++++++++--------- .../kotlin-stdlib-gen/src/templates/Arrays.kt | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/libraries/stdlib/src/generated/_Arrays.kt b/libraries/stdlib/src/generated/_Arrays.kt index f808ced1395..96cc0240311 100644 --- a/libraries/stdlib/src/generated/_Arrays.kt +++ b/libraries/stdlib/src/generated/_Arrays.kt @@ -275,53 +275,53 @@ public fun ShortArray.isNotEmpty(): Boolean { * Returns the last valid index for the array */ public val Array.lastIndex: Int - get() = size - 1 + get() = size() - 1 /** * Returns the last valid index for the array */ public val BooleanArray.lastIndex: Int - get() = size - 1 + get() = size() - 1 /** * Returns the last valid index for the array */ public val ByteArray.lastIndex: Int - get() = size - 1 + get() = size() - 1 /** * Returns the last valid index for the array */ public val CharArray.lastIndex: Int - get() = size - 1 + get() = size() - 1 /** * Returns the last valid index for the array */ public val DoubleArray.lastIndex: Int - get() = size - 1 + get() = size() - 1 /** * Returns the last valid index for the array */ public val FloatArray.lastIndex: Int - get() = size - 1 + get() = size() - 1 /** * Returns the last valid index for the array */ public val IntArray.lastIndex: Int - get() = size - 1 + get() = size() - 1 /** * Returns the last valid index for the array */ public val LongArray.lastIndex: Int - get() = size - 1 + get() = size() - 1 /** * Returns the last valid index for the array */ public val ShortArray.lastIndex: Int - get() = size - 1 + get() = size() - 1 diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/Arrays.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/Arrays.kt index 9f833057273..92c8f8784c4 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/Arrays.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/Arrays.kt @@ -41,7 +41,7 @@ fun arrays(): List { doc { "Returns the last valid index for the array" } returns("Int") body { - "get() = size - 1" + "get() = size() - 1" } }