From 91d42fe34519d34fe57aa25fd88ae8b33cf4754c Mon Sep 17 00:00:00 2001 From: Abduqodiri Qurbonzoda Date: Sat, 27 Mar 2021 04:37:07 +0300 Subject: [PATCH] [K/N] Advance deprecation level of subarrayContentToString to ERROR --- .../runtime/src/main/kotlin/kotlin/collections/ArrayList.kt | 2 +- .../runtime/src/main/kotlin/kotlin/collections/Arrays.kt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/kotlin-native/runtime/src/main/kotlin/kotlin/collections/ArrayList.kt b/kotlin-native/runtime/src/main/kotlin/kotlin/collections/ArrayList.kt index bca09b4a0f7..01da1bd6922 100644 --- a/kotlin-native/runtime/src/main/kotlin/kotlin/collections/ArrayList.kt +++ b/kotlin-native/runtime/src/main/kotlin/kotlin/collections/ArrayList.kt @@ -160,7 +160,7 @@ actual class ArrayList private constructor( } override fun toString(): String { - @Suppress("DEPRECATION") + @Suppress("DEPRECATION_ERROR") return array.subarrayContentToString(offset, length) } diff --git a/kotlin-native/runtime/src/main/kotlin/kotlin/collections/Arrays.kt b/kotlin-native/runtime/src/main/kotlin/kotlin/collections/Arrays.kt index 1e89a90e823..0672afcd9f2 100644 --- a/kotlin-native/runtime/src/main/kotlin/kotlin/collections/Arrays.kt +++ b/kotlin-native/runtime/src/main/kotlin/kotlin/collections/Arrays.kt @@ -23,7 +23,8 @@ internal fun checkCopyOfRangeArguments(fromIndex: Int, toIndex: Int, size: Int) * Returns a string representation of the contents of the subarray of the specified array as if it is [List]. */ @kotlin.internal.InlineOnly -@Deprecated("This function will become internal soon.", level = DeprecationLevel.WARNING) +@Deprecated("This function will become internal soon.") +@DeprecatedSinceKotlin(warningSince = "1.4", errorSince = "1.5") public inline fun Array.subarrayContentToString(offset: Int, length: Int): String { val sb = StringBuilder(2 + length * 3) sb.append("[")