From 3f39b75a895bafe19afead47b48adc7ca31b04c2 Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Thu, 25 Jul 2019 01:33:38 +0300 Subject: [PATCH] Update generated stdlib code - imports - sample refs - copyrights --- .../main/kotlin/generated/_ArraysNative.kt | 22 +++++++++++++++++-- .../kotlin/generated/_CollectionsNative.kt | 6 +++-- .../kotlin/generated/_ComparisonsNative.kt | 4 ++-- .../main/kotlin/generated/_StringsNative.kt | 4 ++-- .../main/kotlin/generated/_UArraysNative.kt | 7 ++++-- 5 files changed, 33 insertions(+), 10 deletions(-) diff --git a/runtime/src/main/kotlin/generated/_ArraysNative.kt b/runtime/src/main/kotlin/generated/_ArraysNative.kt index 56b1f5f7ac7..8095cec296d 100644 --- a/runtime/src/main/kotlin/generated/_ArraysNative.kt +++ b/runtime/src/main/kotlin/generated/_ArraysNative.kt @@ -1,6 +1,6 @@ /* - * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license - * that can be found in the license/LICENSE.txt file. + * Copyright 2010-2019 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. */ package kotlin.collections @@ -10,6 +10,8 @@ package kotlin.collections // See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib // +import kotlin.ranges.contains +import kotlin.ranges.reversed /** * Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this array. @@ -1628,6 +1630,8 @@ public actual inline fun Array.plusElement(element: T): Array { /** * Sorts the array in-place. + * + * @sample samples.collections.Arrays.Sorting.sortArray */ public actual fun IntArray.sort(): Unit { if (size > 1) sortArray(this) @@ -1635,6 +1639,8 @@ public actual fun IntArray.sort(): Unit { /** * Sorts the array in-place. + * + * @sample samples.collections.Arrays.Sorting.sortArray */ public actual fun LongArray.sort(): Unit { if (size > 1) sortArray(this) @@ -1642,6 +1648,8 @@ public actual fun LongArray.sort(): Unit { /** * Sorts the array in-place. + * + * @sample samples.collections.Arrays.Sorting.sortArray */ public actual fun ByteArray.sort(): Unit { if (size > 1) sortArray(this) @@ -1649,6 +1657,8 @@ public actual fun ByteArray.sort(): Unit { /** * Sorts the array in-place. + * + * @sample samples.collections.Arrays.Sorting.sortArray */ public actual fun ShortArray.sort(): Unit { if (size > 1) sortArray(this) @@ -1656,6 +1666,8 @@ public actual fun ShortArray.sort(): Unit { /** * Sorts the array in-place. + * + * @sample samples.collections.Arrays.Sorting.sortArray */ public actual fun DoubleArray.sort(): Unit { if (size > 1) sortArray(this) @@ -1663,6 +1675,8 @@ public actual fun DoubleArray.sort(): Unit { /** * Sorts the array in-place. + * + * @sample samples.collections.Arrays.Sorting.sortArray */ public actual fun FloatArray.sort(): Unit { if (size > 1) sortArray(this) @@ -1670,6 +1684,8 @@ public actual fun FloatArray.sort(): Unit { /** * Sorts the array in-place. + * + * @sample samples.collections.Arrays.Sorting.sortArray */ public actual fun CharArray.sort(): Unit { if (size > 1) sortArray(this) @@ -1679,6 +1695,8 @@ public actual fun CharArray.sort(): Unit { * Sorts the array in-place according to the natural order of its elements. * * The sort is _stable_. It means that equal elements preserve their order relative to each other after sorting. + * + * @sample samples.collections.Arrays.Sorting.sortArrayOfComparable */ public actual fun > Array.sort(): Unit { if (size > 1) sortArray(this) diff --git a/runtime/src/main/kotlin/generated/_CollectionsNative.kt b/runtime/src/main/kotlin/generated/_CollectionsNative.kt index b13abcf3abf..5e2b96f1495 100644 --- a/runtime/src/main/kotlin/generated/_CollectionsNative.kt +++ b/runtime/src/main/kotlin/generated/_CollectionsNative.kt @@ -1,6 +1,6 @@ /* - * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license - * that can be found in the license/LICENSE.txt file. + * Copyright 2010-2019 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. */ package kotlin.collections @@ -10,6 +10,8 @@ package kotlin.collections // See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib // +import kotlin.ranges.contains +import kotlin.ranges.reversed /** * Reverses elements in the list in-place. diff --git a/runtime/src/main/kotlin/generated/_ComparisonsNative.kt b/runtime/src/main/kotlin/generated/_ComparisonsNative.kt index 1ca15c2b85f..352884e8f1f 100644 --- a/runtime/src/main/kotlin/generated/_ComparisonsNative.kt +++ b/runtime/src/main/kotlin/generated/_ComparisonsNative.kt @@ -1,6 +1,6 @@ /* - * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license - * that can be found in the license/LICENSE.txt file. + * Copyright 2010-2019 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. */ package kotlin.comparisons diff --git a/runtime/src/main/kotlin/generated/_StringsNative.kt b/runtime/src/main/kotlin/generated/_StringsNative.kt index 9568099f4cb..258f1103a78 100644 --- a/runtime/src/main/kotlin/generated/_StringsNative.kt +++ b/runtime/src/main/kotlin/generated/_StringsNative.kt @@ -1,6 +1,6 @@ /* - * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license - * that can be found in the license/LICENSE.txt file. + * Copyright 2010-2019 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. */ package kotlin.text diff --git a/runtime/src/main/kotlin/generated/_UArraysNative.kt b/runtime/src/main/kotlin/generated/_UArraysNative.kt index 95acace10ce..152f35000b9 100644 --- a/runtime/src/main/kotlin/generated/_UArraysNative.kt +++ b/runtime/src/main/kotlin/generated/_UArraysNative.kt @@ -1,6 +1,6 @@ /* - * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license - * that can be found in the license/LICENSE.txt file. + * Copyright 2010-2019 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. */ package kotlin.collections @@ -10,6 +10,8 @@ package kotlin.collections // See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib // +import kotlin.ranges.contains +import kotlin.ranges.reversed /** * Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this array. @@ -122,3 +124,4 @@ public actual fun UShortArray.asList(): List { override fun lastIndexOf(element: UShort): Int = this@asList.lastIndexOf(element) } } +