From f4651f22caeea2f1d8374b30b76b1a590760c90c Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Thu, 25 Jun 2015 18:58:33 +0300 Subject: [PATCH] Compiler&plugin deprecations cleanup: adhoc indices property for IntArrayList. --- .../kotlin/cli/jvm/compiler/JvmDependenciesIndex.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/JvmDependenciesIndex.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/JvmDependenciesIndex.kt index 4d2a15ad3b9..e47b4e2fa9c 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/JvmDependenciesIndex.kt +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/JvmDependenciesIndex.kt @@ -174,7 +174,7 @@ public class JvmDependenciesIndex(_roots: List) { // traverse caches starting from last, which contains most specific information for (cacheIndex in caches.indices.reversed()) { val cache = caches[cacheIndex] - for (i in cache.rootIndices.size().indices) { + for (i in cache.rootIndices.indices) { val rootIndex = cache.rootIndices[i] if (rootIndex <= processedRootsUpTo) continue // roots with those indices have been processed by now @@ -248,4 +248,5 @@ public class JvmDependenciesIndex(_roots: List) { } } -private fun IntArrayList.lastOrNull() = if (isEmpty()) null else get(size() - 1) \ No newline at end of file +private fun IntArrayList.lastOrNull() = if (isEmpty()) null else get(size() - 1) +private val IntArrayList.indices: IntRange get() = 0..size()-1 \ No newline at end of file