Fix sample reference for unsigned array range sort

This commit is contained in:
Ilya Gorbunov
2020-05-16 13:22:02 +03:00
parent c40c9a3d14
commit 25f83e941c
2 changed files with 10 additions and 2 deletions
@@ -4010,6 +4010,8 @@ public fun UShortArray.sort(): Unit {
*
* @throws IndexOutOfBoundsException if [fromIndex] is less than zero or [toIndex] is greater than the size of this array.
* @throws IllegalArgumentException if [fromIndex] is greater than [toIndex].
*
* @sample samples.collections.Arrays.Sorting.sortRangeOfArray
*/
@SinceKotlin("1.4")
@ExperimentalUnsignedTypes
@@ -4026,6 +4028,8 @@ public fun UIntArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit {
*
* @throws IndexOutOfBoundsException if [fromIndex] is less than zero or [toIndex] is greater than the size of this array.
* @throws IllegalArgumentException if [fromIndex] is greater than [toIndex].
*
* @sample samples.collections.Arrays.Sorting.sortRangeOfArray
*/
@SinceKotlin("1.4")
@ExperimentalUnsignedTypes
@@ -4042,6 +4046,8 @@ public fun ULongArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit {
*
* @throws IndexOutOfBoundsException if [fromIndex] is less than zero or [toIndex] is greater than the size of this array.
* @throws IllegalArgumentException if [fromIndex] is greater than [toIndex].
*
* @sample samples.collections.Arrays.Sorting.sortRangeOfArray
*/
@SinceKotlin("1.4")
@ExperimentalUnsignedTypes
@@ -4058,6 +4064,8 @@ public fun UByteArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit {
*
* @throws IndexOutOfBoundsException if [fromIndex] is less than zero or [toIndex] is greater than the size of this array.
* @throws IllegalArgumentException if [fromIndex] is greater than [toIndex].
*
* @sample samples.collections.Arrays.Sorting.sortRangeOfArray
*/
@SinceKotlin("1.4")
@ExperimentalUnsignedTypes
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -1326,7 +1326,7 @@ object ArrayOps : TemplateGroupBase() {
specialFor(ArraysOfObjects) {
sample("samples.collections.Arrays.Sorting.sortRangeOfArrayOfComparable")
}
specialFor(ArraysOfPrimitives) {
specialFor(ArraysOfPrimitives, ArraysOfUnsigned) {
sample("samples.collections.Arrays.Sorting.sortRangeOfArray")
}
returns("Unit")