Remove workaround for complex default value in Array.copyInto
#KT-22818
This commit is contained in:
@@ -628,8 +628,6 @@ public actual inline fun CharArray.contentToString(): String {
|
||||
@SinceKotlin("1.3")
|
||||
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
|
||||
public actual fun <T> Array<out T>.copyInto(destination: Array<T>, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = size): Array<T> {
|
||||
@Suppress("NAME_SHADOWING")
|
||||
val endIndex = if (endIndex == -1) size else endIndex // TODO: Remove when default value from expect is fixed
|
||||
System.arraycopy(this, startIndex, destination, destinationOffset, endIndex - startIndex)
|
||||
return destination
|
||||
}
|
||||
@@ -653,8 +651,6 @@ public actual fun <T> Array<out T>.copyInto(destination: Array<T>, destinationOf
|
||||
@SinceKotlin("1.3")
|
||||
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
|
||||
public actual fun ByteArray.copyInto(destination: ByteArray, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = size): ByteArray {
|
||||
@Suppress("NAME_SHADOWING")
|
||||
val endIndex = if (endIndex == -1) size else endIndex // TODO: Remove when default value from expect is fixed
|
||||
System.arraycopy(this, startIndex, destination, destinationOffset, endIndex - startIndex)
|
||||
return destination
|
||||
}
|
||||
@@ -678,8 +674,6 @@ public actual fun ByteArray.copyInto(destination: ByteArray, destinationOffset:
|
||||
@SinceKotlin("1.3")
|
||||
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
|
||||
public actual fun ShortArray.copyInto(destination: ShortArray, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = size): ShortArray {
|
||||
@Suppress("NAME_SHADOWING")
|
||||
val endIndex = if (endIndex == -1) size else endIndex // TODO: Remove when default value from expect is fixed
|
||||
System.arraycopy(this, startIndex, destination, destinationOffset, endIndex - startIndex)
|
||||
return destination
|
||||
}
|
||||
@@ -703,8 +697,6 @@ public actual fun ShortArray.copyInto(destination: ShortArray, destinationOffset
|
||||
@SinceKotlin("1.3")
|
||||
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
|
||||
public actual fun IntArray.copyInto(destination: IntArray, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = size): IntArray {
|
||||
@Suppress("NAME_SHADOWING")
|
||||
val endIndex = if (endIndex == -1) size else endIndex // TODO: Remove when default value from expect is fixed
|
||||
System.arraycopy(this, startIndex, destination, destinationOffset, endIndex - startIndex)
|
||||
return destination
|
||||
}
|
||||
@@ -728,8 +720,6 @@ public actual fun IntArray.copyInto(destination: IntArray, destinationOffset: In
|
||||
@SinceKotlin("1.3")
|
||||
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
|
||||
public actual fun LongArray.copyInto(destination: LongArray, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = size): LongArray {
|
||||
@Suppress("NAME_SHADOWING")
|
||||
val endIndex = if (endIndex == -1) size else endIndex // TODO: Remove when default value from expect is fixed
|
||||
System.arraycopy(this, startIndex, destination, destinationOffset, endIndex - startIndex)
|
||||
return destination
|
||||
}
|
||||
@@ -753,8 +743,6 @@ public actual fun LongArray.copyInto(destination: LongArray, destinationOffset:
|
||||
@SinceKotlin("1.3")
|
||||
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
|
||||
public actual fun FloatArray.copyInto(destination: FloatArray, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = size): FloatArray {
|
||||
@Suppress("NAME_SHADOWING")
|
||||
val endIndex = if (endIndex == -1) size else endIndex // TODO: Remove when default value from expect is fixed
|
||||
System.arraycopy(this, startIndex, destination, destinationOffset, endIndex - startIndex)
|
||||
return destination
|
||||
}
|
||||
@@ -778,8 +766,6 @@ public actual fun FloatArray.copyInto(destination: FloatArray, destinationOffset
|
||||
@SinceKotlin("1.3")
|
||||
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
|
||||
public actual fun DoubleArray.copyInto(destination: DoubleArray, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = size): DoubleArray {
|
||||
@Suppress("NAME_SHADOWING")
|
||||
val endIndex = if (endIndex == -1) size else endIndex // TODO: Remove when default value from expect is fixed
|
||||
System.arraycopy(this, startIndex, destination, destinationOffset, endIndex - startIndex)
|
||||
return destination
|
||||
}
|
||||
@@ -803,8 +789,6 @@ public actual fun DoubleArray.copyInto(destination: DoubleArray, destinationOffs
|
||||
@SinceKotlin("1.3")
|
||||
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
|
||||
public actual fun BooleanArray.copyInto(destination: BooleanArray, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = size): BooleanArray {
|
||||
@Suppress("NAME_SHADOWING")
|
||||
val endIndex = if (endIndex == -1) size else endIndex // TODO: Remove when default value from expect is fixed
|
||||
System.arraycopy(this, startIndex, destination, destinationOffset, endIndex - startIndex)
|
||||
return destination
|
||||
}
|
||||
@@ -828,8 +812,6 @@ public actual fun BooleanArray.copyInto(destination: BooleanArray, destinationOf
|
||||
@SinceKotlin("1.3")
|
||||
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
|
||||
public actual fun CharArray.copyInto(destination: CharArray, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = size): CharArray {
|
||||
@Suppress("NAME_SHADOWING")
|
||||
val endIndex = if (endIndex == -1) size else endIndex // TODO: Remove when default value from expect is fixed
|
||||
System.arraycopy(this, startIndex, destination, destinationOffset, endIndex - startIndex)
|
||||
return destination
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user