stdlib fixes:
- 'sequence(initialValue: T?, ...)' should have LowPriorityInOverloadResolution
(otherwise 'sequence({...}, {...})' is ambiguous).
- 'copyOf' and 'copyOfRange' should be defined for 'Array<T>' only
('Array<out T>' version always loses to 'Array<T>', since the second one
is always more specific).
This commit is contained in:
@@ -11254,14 +11254,6 @@ public fun ShortArray.binarySearch(element: Short, fromIndex: Int = 0, toIndex:
|
||||
return Arrays.binarySearch(this, fromIndex, toIndex, element)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns new array which is a copy of the original array.
|
||||
*/
|
||||
@kotlin.jvm.JvmVersion
|
||||
public fun <T> Array<out T>.copyOf(): Array<out T> {
|
||||
return Arrays.copyOf(this, size)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns new array which is a copy of the original array.
|
||||
*/
|
||||
@@ -11335,14 +11327,6 @@ public fun <T> Array<T>.copyOf(): Array<T> {
|
||||
return Arrays.copyOf(this, size)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns new array which is a copy of the original array.
|
||||
*/
|
||||
@kotlin.jvm.JvmVersion
|
||||
public fun <T> Array<out T>.copyOf(newSize: Int): Array<out T?> {
|
||||
return Arrays.copyOf(this, newSize)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns new array which is a copy of the original array.
|
||||
*/
|
||||
@@ -11416,14 +11400,6 @@ public fun <T> Array<T>.copyOf(newSize: Int): Array<T?> {
|
||||
return Arrays.copyOf(this, newSize)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns new array which is a copy of range of original array.
|
||||
*/
|
||||
@kotlin.jvm.JvmVersion
|
||||
public fun <T> Array<out T>.copyOfRange(fromIndex: Int, toIndex: Int): Array<out T> {
|
||||
return Arrays.copyOfRange(this, fromIndex, toIndex)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns new array which is a copy of range of original array.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user