sort and binarySearch methods now have correct default toIndex parameter #KT-4963 Fixed
This commit is contained in:
committed by
Andrey Breslav
parent
9ec78a437d
commit
178ae83e8d
@@ -53,7 +53,7 @@ fun specialJVM(): List<GenericFunction> {
|
||||
}
|
||||
}
|
||||
|
||||
templates add f("binarySearch(element: T, fromIndex: Int = 0, toIndex: Int = size - 1)") {
|
||||
templates add f("binarySearch(element: T, fromIndex: Int = 0, toIndex: Int = size)") {
|
||||
only(ArraysOfObjects, ArraysOfPrimitives)
|
||||
exclude(PrimitiveType.Boolean)
|
||||
doc { "Searches array or range of array for provided element index using binary search algorithm. Array is expected to be sorted." }
|
||||
@@ -63,7 +63,7 @@ fun specialJVM(): List<GenericFunction> {
|
||||
}
|
||||
}
|
||||
|
||||
templates add f("sort(fromIndex: Int = 0, toIndex: Int = size - 1)") {
|
||||
templates add f("sort(fromIndex: Int = 0, toIndex: Int = size)") {
|
||||
only(ArraysOfObjects, ArraysOfPrimitives)
|
||||
exclude(PrimitiveType.Boolean)
|
||||
doc { "Sorts array or range in array inplace" }
|
||||
|
||||
Reference in New Issue
Block a user