Transform *Array.size to properties

This commit is contained in:
Denis Zharkov
2015-10-14 13:56:18 +03:00
parent b050324869
commit bd37a10677
38 changed files with 147 additions and 107 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ import java.util.HashSet
fun iarray(vararg a : Int) = a // BUG
val IntArray.indices: IntRange get() = IntRange(0, lastIndex())
fun IntArray.lastIndex() = size() - 1
fun IntArray.lastIndex() = size - 1
fun box() : String {
val vals = iarray(789, 678, 567, 456, 345, 234, 123, 12)