Accept in-projection of Comparator as a parameter when possible.
This commit is contained in:
@@ -108,7 +108,7 @@ fun specialJVM(): List<GenericFunction> {
|
||||
}
|
||||
}
|
||||
|
||||
templates add f("binarySearch(element: T, comparator: Comparator<T>, fromIndex: Int = 0, toIndex: Int = size())") {
|
||||
templates add f("binarySearch(element: T, comparator: Comparator<in T>, fromIndex: Int = 0, toIndex: Int = size())") {
|
||||
only(ArraysOfObjects)
|
||||
doc { "Searches array or range of array for provided element index using binary search algorithm. Array is expected to be sorted according to the specified [comparator]." }
|
||||
returns("Int")
|
||||
|
||||
Reference in New Issue
Block a user