From 76759d3a5f8f49f788f0ae4f8d48ba19ecfd6703 Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Fri, 17 Jan 2020 00:37:33 +0300 Subject: [PATCH] Drop compatibility stub for experimental unsigned API from 1.3.0 --- .../jvm/src/kotlin/collections/UArraysKt.kt | 141 ------------------ .../kotlin-stdlib-runtime-merged.txt | 24 --- 2 files changed, 165 deletions(-) delete mode 100644 libraries/stdlib/jvm/src/kotlin/collections/UArraysKt.kt diff --git a/libraries/stdlib/jvm/src/kotlin/collections/UArraysKt.kt b/libraries/stdlib/jvm/src/kotlin/collections/UArraysKt.kt deleted file mode 100644 index 7201817a186..00000000000 --- a/libraries/stdlib/jvm/src/kotlin/collections/UArraysKt.kt +++ /dev/null @@ -1,141 +0,0 @@ -/* - * 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 - -import kotlin.random.Random - -@Deprecated("Provided for binary compatibility", level = DeprecationLevel.HIDDEN) -public object UArraysKt { - - @JvmStatic - @ExperimentalUnsignedTypes - public fun UIntArray.random(random: Random): UInt { - if (isEmpty()) - throw NoSuchElementException("Array is empty.") - return get(random.nextInt(size)) - } - - @JvmStatic - @ExperimentalUnsignedTypes - public fun ULongArray.random(random: Random): ULong { - if (isEmpty()) - throw NoSuchElementException("Array is empty.") - return get(random.nextInt(size)) - } - - @JvmStatic - @ExperimentalUnsignedTypes - public fun UByteArray.random(random: Random): UByte { - if (isEmpty()) - throw NoSuchElementException("Array is empty.") - return get(random.nextInt(size)) - } - - @JvmStatic - @ExperimentalUnsignedTypes - public fun UShortArray.random(random: Random): UShort { - if (isEmpty()) - throw NoSuchElementException("Array is empty.") - return get(random.nextInt(size)) - } - - @JvmStatic - @ExperimentalUnsignedTypes - public infix fun UIntArray.contentEquals(other: UIntArray): Boolean { - return storage.contentEquals(other.storage) - } - - @JvmStatic - @ExperimentalUnsignedTypes - public infix fun ULongArray.contentEquals(other: ULongArray): Boolean { - return storage.contentEquals(other.storage) - } - - @JvmStatic - @ExperimentalUnsignedTypes - public infix fun UByteArray.contentEquals(other: UByteArray): Boolean { - return storage.contentEquals(other.storage) - } - - @JvmStatic - @ExperimentalUnsignedTypes - public infix fun UShortArray.contentEquals(other: UShortArray): Boolean { - return storage.contentEquals(other.storage) - } - - @JvmStatic - @ExperimentalUnsignedTypes - public fun UIntArray.contentHashCode(): Int { - return storage.contentHashCode() - } - - @JvmStatic - @ExperimentalUnsignedTypes - public fun ULongArray.contentHashCode(): Int { - return storage.contentHashCode() - } - - @JvmStatic - @ExperimentalUnsignedTypes - public fun UByteArray.contentHashCode(): Int { - return storage.contentHashCode() - } - - @JvmStatic - @ExperimentalUnsignedTypes - public fun UShortArray.contentHashCode(): Int { - return storage.contentHashCode() - } - - @JvmStatic - @ExperimentalUnsignedTypes - public fun UIntArray.contentToString(): String { - return joinToString(", ", "[", "]") - } - - @JvmStatic - @ExperimentalUnsignedTypes - public fun ULongArray.contentToString(): String { - return joinToString(", ", "[", "]") - } - - @JvmStatic - @ExperimentalUnsignedTypes - public fun UByteArray.contentToString(): String { - return joinToString(", ", "[", "]") - } - - @JvmStatic - @ExperimentalUnsignedTypes - public fun UShortArray.contentToString(): String { - return joinToString(", ", "[", "]") - } - - @JvmStatic - @ExperimentalUnsignedTypes - public fun UIntArray.toTypedArray(): Array { - return Array(size) { index -> this[index] } - } - - @JvmStatic - @ExperimentalUnsignedTypes - public fun ULongArray.toTypedArray(): Array { - return Array(size) { index -> this[index] } - } - - @JvmStatic - @ExperimentalUnsignedTypes - public fun UByteArray.toTypedArray(): Array { - return Array(size) { index -> this[index] } - } - - @JvmStatic - @ExperimentalUnsignedTypes - public fun UShortArray.toTypedArray(): Array { - return Array(size) { index -> this[index] } - } - -} \ No newline at end of file diff --git a/libraries/tools/binary-compatibility-validator/reference-public-api/kotlin-stdlib-runtime-merged.txt b/libraries/tools/binary-compatibility-validator/reference-public-api/kotlin-stdlib-runtime-merged.txt index 6f86e72a3ca..4114bf40578 100644 --- a/libraries/tools/binary-compatibility-validator/reference-public-api/kotlin-stdlib-runtime-merged.txt +++ b/libraries/tools/binary-compatibility-validator/reference-public-api/kotlin-stdlib-runtime-merged.txt @@ -2373,30 +2373,6 @@ public abstract class kotlin/collections/ShortIterator : java/util/Iterator, kot public fun remove ()V } -public final class kotlin/collections/UArraysKt { - public static final field INSTANCE Lkotlin/collections/UArraysKt; - public static final fun contentEquals-ctEhBpI ([I[I)Z - public static final fun contentEquals-kdPth3s ([B[B)Z - public static final fun contentEquals-mazbYpA ([S[S)Z - public static final fun contentEquals-us8wMrg ([J[J)Z - public static final fun contentHashCode--ajY-9A ([I)I - public static final fun contentHashCode-GBYM_sE ([B)I - public static final fun contentHashCode-QwZRm1k ([J)I - public static final fun contentHashCode-rL5Bavg ([S)I - public static final fun contentToString--ajY-9A ([I)Ljava/lang/String; - public static final fun contentToString-GBYM_sE ([B)Ljava/lang/String; - public static final fun contentToString-QwZRm1k ([J)Ljava/lang/String; - public static final fun contentToString-rL5Bavg ([S)Ljava/lang/String; - public static final fun random-2D5oskM ([ILkotlin/random/Random;)I - public static final fun random-JzugnMA ([JLkotlin/random/Random;)J - public static final fun random-oSF2wD8 ([BLkotlin/random/Random;)B - public static final fun random-s5X_as8 ([SLkotlin/random/Random;)S - public static final fun toTypedArray--ajY-9A ([I)[Lkotlin/UInt; - public static final fun toTypedArray-GBYM_sE ([B)[Lkotlin/UByte; - public static final fun toTypedArray-QwZRm1k ([J)[Lkotlin/ULong; - public static final fun toTypedArray-rL5Bavg ([S)[Lkotlin/UShort; -} - public abstract class kotlin/collections/UByteIterator : java/util/Iterator, kotlin/jvm/internal/markers/KMappedMarker { public fun ()V public synthetic fun next ()Ljava/lang/Object;