From baa8354f37c9a2a037d95ce276d81415af467a49 Mon Sep 17 00:00:00 2001 From: Abduqodiri Qurbonzoda Date: Mon, 13 Jul 2020 05:32:49 +0300 Subject: [PATCH] Replace @LowPriorityInOverloadResolution with @DeprecatedSinceKotlin #KT-37101 (cherry picked from commit 76372cf4aaafde771cc8e7a901a1f1dc771c3650) --- .../main/kotlin/generated/_ArraysNative.kt | 81 ++++++++++++------- .../kotlin/text/StringNumberConversions.kt | 8 ++ 2 files changed, 62 insertions(+), 27 deletions(-) diff --git a/runtime/src/main/kotlin/generated/_ArraysNative.kt b/runtime/src/main/kotlin/generated/_ArraysNative.kt index 9381731e510..6108abb2f27 100644 --- a/runtime/src/main/kotlin/generated/_ArraysNative.kt +++ b/runtime/src/main/kotlin/generated/_ArraysNative.kt @@ -321,8 +321,9 @@ public actual fun Array?.contentDeepToString(): String { * The elements are compared for equality with the [equals][Any.equals] function. * For floating point numbers it means that `NaN` is equal to itself and `-0.0` is not equal to `0.0`. */ +@Deprecated("Use Kotlin compiler 1.4 to avoid deprecation warning.") @SinceKotlin("1.1") -@kotlin.internal.LowPriorityInOverloadResolution +@DeprecatedSinceKotlin(hiddenSince = "1.4") public actual infix fun Array.contentEquals(other: Array): Boolean { return this.contentEquals(other) } @@ -334,8 +335,9 @@ public actual infix fun Array.contentEquals(other: Array): Boo * The elements are compared for equality with the [equals][Any.equals] function. * For floating point numbers it means that `NaN` is equal to itself and `-0.0` is not equal to `0.0`. */ +@Deprecated("Use Kotlin compiler 1.4 to avoid deprecation warning.") @SinceKotlin("1.1") -@kotlin.internal.LowPriorityInOverloadResolution +@DeprecatedSinceKotlin(hiddenSince = "1.4") public actual infix fun ByteArray.contentEquals(other: ByteArray): Boolean { return this.contentEquals(other) } @@ -347,8 +349,9 @@ public actual infix fun ByteArray.contentEquals(other: ByteArray): Boolean { * The elements are compared for equality with the [equals][Any.equals] function. * For floating point numbers it means that `NaN` is equal to itself and `-0.0` is not equal to `0.0`. */ +@Deprecated("Use Kotlin compiler 1.4 to avoid deprecation warning.") @SinceKotlin("1.1") -@kotlin.internal.LowPriorityInOverloadResolution +@DeprecatedSinceKotlin(hiddenSince = "1.4") public actual infix fun ShortArray.contentEquals(other: ShortArray): Boolean { return this.contentEquals(other) } @@ -360,8 +363,9 @@ public actual infix fun ShortArray.contentEquals(other: ShortArray): Boolean { * The elements are compared for equality with the [equals][Any.equals] function. * For floating point numbers it means that `NaN` is equal to itself and `-0.0` is not equal to `0.0`. */ +@Deprecated("Use Kotlin compiler 1.4 to avoid deprecation warning.") @SinceKotlin("1.1") -@kotlin.internal.LowPriorityInOverloadResolution +@DeprecatedSinceKotlin(hiddenSince = "1.4") public actual infix fun IntArray.contentEquals(other: IntArray): Boolean { return this.contentEquals(other) } @@ -373,8 +377,9 @@ public actual infix fun IntArray.contentEquals(other: IntArray): Boolean { * The elements are compared for equality with the [equals][Any.equals] function. * For floating point numbers it means that `NaN` is equal to itself and `-0.0` is not equal to `0.0`. */ +@Deprecated("Use Kotlin compiler 1.4 to avoid deprecation warning.") @SinceKotlin("1.1") -@kotlin.internal.LowPriorityInOverloadResolution +@DeprecatedSinceKotlin(hiddenSince = "1.4") public actual infix fun LongArray.contentEquals(other: LongArray): Boolean { return this.contentEquals(other) } @@ -386,8 +391,9 @@ public actual infix fun LongArray.contentEquals(other: LongArray): Boolean { * The elements are compared for equality with the [equals][Any.equals] function. * For floating point numbers it means that `NaN` is equal to itself and `-0.0` is not equal to `0.0`. */ +@Deprecated("Use Kotlin compiler 1.4 to avoid deprecation warning.") @SinceKotlin("1.1") -@kotlin.internal.LowPriorityInOverloadResolution +@DeprecatedSinceKotlin(hiddenSince = "1.4") public actual infix fun FloatArray.contentEquals(other: FloatArray): Boolean { return this.contentEquals(other) } @@ -399,8 +405,9 @@ public actual infix fun FloatArray.contentEquals(other: FloatArray): Boolean { * The elements are compared for equality with the [equals][Any.equals] function. * For floating point numbers it means that `NaN` is equal to itself and `-0.0` is not equal to `0.0`. */ +@Deprecated("Use Kotlin compiler 1.4 to avoid deprecation warning.") @SinceKotlin("1.1") -@kotlin.internal.LowPriorityInOverloadResolution +@DeprecatedSinceKotlin(hiddenSince = "1.4") public actual infix fun DoubleArray.contentEquals(other: DoubleArray): Boolean { return this.contentEquals(other) } @@ -412,8 +419,9 @@ public actual infix fun DoubleArray.contentEquals(other: DoubleArray): Boolean { * The elements are compared for equality with the [equals][Any.equals] function. * For floating point numbers it means that `NaN` is equal to itself and `-0.0` is not equal to `0.0`. */ +@Deprecated("Use Kotlin compiler 1.4 to avoid deprecation warning.") @SinceKotlin("1.1") -@kotlin.internal.LowPriorityInOverloadResolution +@DeprecatedSinceKotlin(hiddenSince = "1.4") public actual infix fun BooleanArray.contentEquals(other: BooleanArray): Boolean { return this.contentEquals(other) } @@ -425,8 +433,9 @@ public actual infix fun BooleanArray.contentEquals(other: BooleanArray): Boolean * The elements are compared for equality with the [equals][Any.equals] function. * For floating point numbers it means that `NaN` is equal to itself and `-0.0` is not equal to `0.0`. */ +@Deprecated("Use Kotlin compiler 1.4 to avoid deprecation warning.") @SinceKotlin("1.1") -@kotlin.internal.LowPriorityInOverloadResolution +@DeprecatedSinceKotlin(hiddenSince = "1.4") public actual infix fun CharArray.contentEquals(other: CharArray): Boolean { return this.contentEquals(other) } @@ -596,8 +605,9 @@ public actual infix fun CharArray?.contentEquals(other: CharArray?): Boolean { /** * Returns a hash code based on the contents of this array as if it is [List]. */ +@Deprecated("Use Kotlin compiler 1.4 to avoid deprecation warning.") @SinceKotlin("1.1") -@kotlin.internal.LowPriorityInOverloadResolution +@DeprecatedSinceKotlin(hiddenSince = "1.4") public actual fun Array.contentHashCode(): Int { return this.contentHashCode() } @@ -605,8 +615,9 @@ public actual fun Array.contentHashCode(): Int { /** * Returns a hash code based on the contents of this array as if it is [List]. */ +@Deprecated("Use Kotlin compiler 1.4 to avoid deprecation warning.") @SinceKotlin("1.1") -@kotlin.internal.LowPriorityInOverloadResolution +@DeprecatedSinceKotlin(hiddenSince = "1.4") public actual fun ByteArray.contentHashCode(): Int { return this.contentHashCode() } @@ -614,8 +625,9 @@ public actual fun ByteArray.contentHashCode(): Int { /** * Returns a hash code based on the contents of this array as if it is [List]. */ +@Deprecated("Use Kotlin compiler 1.4 to avoid deprecation warning.") @SinceKotlin("1.1") -@kotlin.internal.LowPriorityInOverloadResolution +@DeprecatedSinceKotlin(hiddenSince = "1.4") public actual fun ShortArray.contentHashCode(): Int { return this.contentHashCode() } @@ -623,8 +635,9 @@ public actual fun ShortArray.contentHashCode(): Int { /** * Returns a hash code based on the contents of this array as if it is [List]. */ +@Deprecated("Use Kotlin compiler 1.4 to avoid deprecation warning.") @SinceKotlin("1.1") -@kotlin.internal.LowPriorityInOverloadResolution +@DeprecatedSinceKotlin(hiddenSince = "1.4") public actual fun IntArray.contentHashCode(): Int { return this.contentHashCode() } @@ -632,8 +645,9 @@ public actual fun IntArray.contentHashCode(): Int { /** * Returns a hash code based on the contents of this array as if it is [List]. */ +@Deprecated("Use Kotlin compiler 1.4 to avoid deprecation warning.") @SinceKotlin("1.1") -@kotlin.internal.LowPriorityInOverloadResolution +@DeprecatedSinceKotlin(hiddenSince = "1.4") public actual fun LongArray.contentHashCode(): Int { return this.contentHashCode() } @@ -641,8 +655,9 @@ public actual fun LongArray.contentHashCode(): Int { /** * Returns a hash code based on the contents of this array as if it is [List]. */ +@Deprecated("Use Kotlin compiler 1.4 to avoid deprecation warning.") @SinceKotlin("1.1") -@kotlin.internal.LowPriorityInOverloadResolution +@DeprecatedSinceKotlin(hiddenSince = "1.4") public actual fun FloatArray.contentHashCode(): Int { return this.contentHashCode() } @@ -650,8 +665,9 @@ public actual fun FloatArray.contentHashCode(): Int { /** * Returns a hash code based on the contents of this array as if it is [List]. */ +@Deprecated("Use Kotlin compiler 1.4 to avoid deprecation warning.") @SinceKotlin("1.1") -@kotlin.internal.LowPriorityInOverloadResolution +@DeprecatedSinceKotlin(hiddenSince = "1.4") public actual fun DoubleArray.contentHashCode(): Int { return this.contentHashCode() } @@ -659,8 +675,9 @@ public actual fun DoubleArray.contentHashCode(): Int { /** * Returns a hash code based on the contents of this array as if it is [List]. */ +@Deprecated("Use Kotlin compiler 1.4 to avoid deprecation warning.") @SinceKotlin("1.1") -@kotlin.internal.LowPriorityInOverloadResolution +@DeprecatedSinceKotlin(hiddenSince = "1.4") public actual fun BooleanArray.contentHashCode(): Int { return this.contentHashCode() } @@ -668,8 +685,9 @@ public actual fun BooleanArray.contentHashCode(): Int { /** * Returns a hash code based on the contents of this array as if it is [List]. */ +@Deprecated("Use Kotlin compiler 1.4 to avoid deprecation warning.") @SinceKotlin("1.1") -@kotlin.internal.LowPriorityInOverloadResolution +@DeprecatedSinceKotlin(hiddenSince = "1.4") public actual fun CharArray.contentHashCode(): Int { return this.contentHashCode() } @@ -787,8 +805,9 @@ public actual fun CharArray?.contentHashCode(): Int { * * @sample samples.collections.Arrays.ContentOperations.contentToString */ +@Deprecated("Use Kotlin compiler 1.4 to avoid deprecation warning.") @SinceKotlin("1.1") -@kotlin.internal.LowPriorityInOverloadResolution +@DeprecatedSinceKotlin(hiddenSince = "1.4") public actual fun Array.contentToString(): String { return this.contentToString() } @@ -798,8 +817,9 @@ public actual fun Array.contentToString(): String { * * @sample samples.collections.Arrays.ContentOperations.contentToString */ +@Deprecated("Use Kotlin compiler 1.4 to avoid deprecation warning.") @SinceKotlin("1.1") -@kotlin.internal.LowPriorityInOverloadResolution +@DeprecatedSinceKotlin(hiddenSince = "1.4") public actual fun ByteArray.contentToString(): String { return this.contentToString() } @@ -809,8 +829,9 @@ public actual fun ByteArray.contentToString(): String { * * @sample samples.collections.Arrays.ContentOperations.contentToString */ +@Deprecated("Use Kotlin compiler 1.4 to avoid deprecation warning.") @SinceKotlin("1.1") -@kotlin.internal.LowPriorityInOverloadResolution +@DeprecatedSinceKotlin(hiddenSince = "1.4") public actual fun ShortArray.contentToString(): String { return this.contentToString() } @@ -820,8 +841,9 @@ public actual fun ShortArray.contentToString(): String { * * @sample samples.collections.Arrays.ContentOperations.contentToString */ +@Deprecated("Use Kotlin compiler 1.4 to avoid deprecation warning.") @SinceKotlin("1.1") -@kotlin.internal.LowPriorityInOverloadResolution +@DeprecatedSinceKotlin(hiddenSince = "1.4") public actual fun IntArray.contentToString(): String { return this.contentToString() } @@ -831,8 +853,9 @@ public actual fun IntArray.contentToString(): String { * * @sample samples.collections.Arrays.ContentOperations.contentToString */ +@Deprecated("Use Kotlin compiler 1.4 to avoid deprecation warning.") @SinceKotlin("1.1") -@kotlin.internal.LowPriorityInOverloadResolution +@DeprecatedSinceKotlin(hiddenSince = "1.4") public actual fun LongArray.contentToString(): String { return this.contentToString() } @@ -842,8 +865,9 @@ public actual fun LongArray.contentToString(): String { * * @sample samples.collections.Arrays.ContentOperations.contentToString */ +@Deprecated("Use Kotlin compiler 1.4 to avoid deprecation warning.") @SinceKotlin("1.1") -@kotlin.internal.LowPriorityInOverloadResolution +@DeprecatedSinceKotlin(hiddenSince = "1.4") public actual fun FloatArray.contentToString(): String { return this.contentToString() } @@ -853,8 +877,9 @@ public actual fun FloatArray.contentToString(): String { * * @sample samples.collections.Arrays.ContentOperations.contentToString */ +@Deprecated("Use Kotlin compiler 1.4 to avoid deprecation warning.") @SinceKotlin("1.1") -@kotlin.internal.LowPriorityInOverloadResolution +@DeprecatedSinceKotlin(hiddenSince = "1.4") public actual fun DoubleArray.contentToString(): String { return this.contentToString() } @@ -864,8 +889,9 @@ public actual fun DoubleArray.contentToString(): String { * * @sample samples.collections.Arrays.ContentOperations.contentToString */ +@Deprecated("Use Kotlin compiler 1.4 to avoid deprecation warning.") @SinceKotlin("1.1") -@kotlin.internal.LowPriorityInOverloadResolution +@DeprecatedSinceKotlin(hiddenSince = "1.4") public actual fun BooleanArray.contentToString(): String { return this.contentToString() } @@ -875,8 +901,9 @@ public actual fun BooleanArray.contentToString(): String { * * @sample samples.collections.Arrays.ContentOperations.contentToString */ +@Deprecated("Use Kotlin compiler 1.4 to avoid deprecation warning.") @SinceKotlin("1.1") -@kotlin.internal.LowPriorityInOverloadResolution +@DeprecatedSinceKotlin(hiddenSince = "1.4") public actual fun CharArray.contentToString(): String { return this.contentToString() } diff --git a/runtime/src/main/kotlin/kotlin/text/StringNumberConversions.kt b/runtime/src/main/kotlin/kotlin/text/StringNumberConversions.kt index b11c98be1ab..993092b5133 100644 --- a/runtime/src/main/kotlin/kotlin/text/StringNumberConversions.kt +++ b/runtime/src/main/kotlin/kotlin/text/StringNumberConversions.kt @@ -51,6 +51,14 @@ external internal fun longToString(value: Long, radix: Int): String @kotlin.internal.InlineOnly public actual inline fun Long.toString(radix: Int): String = longToString(this, checkRadix(radix)) +/** + * Returns `true` if the content of this string is equal to the word "true", ignoring case, and `false` otherwise. + */ +@Deprecated("Use Kotlin compiler 1.4 to avoid deprecation warning.") +@DeprecatedSinceKotlin(hiddenSince = "1.4") +@kotlin.internal.InlineOnly +public actual inline fun String.toBoolean(): Boolean = this.toBoolean() + /** * Returns `true` if this string is not `null` and its content is equal to the word "true", ignoring case, and `false` otherwise. */