Deprecate subarrayContentToString in order to make it internal
(cherry picked from commit 74aa0b379626d282e486ce713615e51a694c6c36)
This commit is contained in:
committed by
Vasily Levchenko
parent
b0e30130b4
commit
1c0f7753ea
@@ -160,6 +160,7 @@ actual class ArrayList<E> private constructor(
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
@Suppress("DEPRECATION")
|
||||
return array.subarrayContentToString(offset, length)
|
||||
}
|
||||
|
||||
|
||||
@@ -22,8 +22,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].
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
@kotlin.internal.InlineOnly
|
||||
@Deprecated("This function will become internal soon.", level = DeprecationLevel.WARNING)
|
||||
public inline fun <T> Array<out T>.subarrayContentToString(offset: Int, length: Int): String {
|
||||
val sb = StringBuilder(2 + length * 3)
|
||||
sb.append("[")
|
||||
|
||||
Reference in New Issue
Block a user