diff --git a/libraries/stdlib/api/js-v1/kotlin.collections.kt b/libraries/stdlib/api/js-v1/kotlin.collections.kt index cea8ac3ba7a..86f30b74d14 100644 --- a/libraries/stdlib/api/js-v1/kotlin.collections.kt +++ b/libraries/stdlib/api/js-v1/kotlin.collections.kt @@ -1044,9 +1044,11 @@ public operator fun kotlin.ByteArray.contains(element: kotlin.Byte): kotlin.Bool public operator fun kotlin.CharArray.contains(element: kotlin.Char): kotlin.Boolean @kotlin.Deprecated(message = "The function has unclear behavior when searching for NaN or zero values and will be removed soon. Use 'any { it == element }' instead to continue using this behavior, or '.asList().contains(element: T)' to get the same search behavior as in a list.", replaceWith = kotlin.ReplaceWith(expression = "any { it == element }", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.4") public operator fun kotlin.DoubleArray.contains(element: kotlin.Double): kotlin.Boolean @kotlin.Deprecated(message = "The function has unclear behavior when searching for NaN or zero values and will be removed soon. Use 'any { it == element }' instead to continue using this behavior, or '.asList().contains(element: T)' to get the same search behavior as in a list.", replaceWith = kotlin.ReplaceWith(expression = "any { it == element }", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.4") public operator fun kotlin.FloatArray.contains(element: kotlin.Float): kotlin.Boolean public operator fun kotlin.IntArray.contains(element: kotlin.Int): kotlin.Boolean @@ -3487,9 +3489,11 @@ public fun kotlin.ByteArray.indexOf(element: kotlin.Byte): kotlin.Int public fun kotlin.CharArray.indexOf(element: kotlin.Char): kotlin.Int @kotlin.Deprecated(message = "The function has unclear behavior when searching for NaN or zero values and will be removed soon. Use 'indexOfFirst { it == element }' instead to continue using this behavior, or '.asList().indexOf(element: T)' to get the same search behavior as in a list.", replaceWith = kotlin.ReplaceWith(expression = "indexOfFirst { it == element }", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.4") public fun kotlin.DoubleArray.indexOf(element: kotlin.Double): kotlin.Int @kotlin.Deprecated(message = "The function has unclear behavior when searching for NaN or zero values and will be removed soon. Use 'indexOfFirst { it == element }' instead to continue using this behavior, or '.asList().indexOf(element: T)' to get the same search behavior as in a list.", replaceWith = kotlin.ReplaceWith(expression = "indexOfFirst { it == element }", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.4") public fun kotlin.FloatArray.indexOf(element: kotlin.Float): kotlin.Int public fun kotlin.IntArray.indexOf(element: kotlin.Int): kotlin.Int @@ -3844,9 +3848,11 @@ public fun kotlin.ByteArray.lastIndexOf(element: kotlin.Byte): kotlin.Int public fun kotlin.CharArray.lastIndexOf(element: kotlin.Char): kotlin.Int @kotlin.Deprecated(message = "The function has unclear behavior when searching for NaN or zero values and will be removed soon. Use 'indexOfLast { it == element }' instead to continue using this behavior, or '.asList().lastIndexOf(element: T)' to get the same search behavior as in a list.", replaceWith = kotlin.ReplaceWith(expression = "indexOfLast { it == element }", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.4") public fun kotlin.DoubleArray.lastIndexOf(element: kotlin.Double): kotlin.Int @kotlin.Deprecated(message = "The function has unclear behavior when searching for NaN or zero values and will be removed soon. Use 'indexOfLast { it == element }' instead to continue using this behavior, or '.asList().lastIndexOf(element: T)' to get the same search behavior as in a list.", replaceWith = kotlin.ReplaceWith(expression = "indexOfLast { it == element }", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.4") public fun kotlin.FloatArray.lastIndexOf(element: kotlin.Float): kotlin.Int public fun kotlin.IntArray.lastIndexOf(element: kotlin.Int): kotlin.Int diff --git a/libraries/stdlib/api/js-v1/kotlin.ranges.kt b/libraries/stdlib/api/js-v1/kotlin.ranges.kt index 648a5be6d51..f54d761be5b 100644 --- a/libraries/stdlib/api/js-v1/kotlin.ranges.kt +++ b/libraries/stdlib/api/js-v1/kotlin.ranges.kt @@ -113,11 +113,13 @@ public inline operator fun > @kotlin.internal.InlineOnly public inline operator fun kotlin.ranges.CharRange.contains(element: kotlin.Char?): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "byteRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Double): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "byteRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Float): kotlin.Boolean @@ -130,52 +132,62 @@ public operator fun kotlin.ranges.ClosedRange.contains(value: kotli @kotlin.jvm.JvmName(name = "byteRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Short): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "doubleRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Byte): kotlin.Boolean @kotlin.jvm.JvmName(name = "doubleRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Float): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "doubleRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Int): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "doubleRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Long): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "doubleRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Short): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "floatRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Byte): kotlin.Boolean @kotlin.jvm.JvmName(name = "floatRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Double): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "floatRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Int): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "floatRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Long): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "floatRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Short): kotlin.Boolean @kotlin.jvm.JvmName(name = "intRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Byte): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "intRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Double): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "intRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Float): kotlin.Boolean @@ -188,11 +200,13 @@ public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin @kotlin.jvm.JvmName(name = "longRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Byte): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "longRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Double): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "longRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Float): kotlin.Boolean @@ -205,11 +219,13 @@ public operator fun kotlin.ranges.ClosedRange.contains(value: kotli @kotlin.jvm.JvmName(name = "shortRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Byte): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "shortRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Double): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "shortRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Float): kotlin.Boolean diff --git a/libraries/stdlib/api/js/kotlin.collections.kt b/libraries/stdlib/api/js/kotlin.collections.kt index 6267a12a022..f440e17d762 100644 --- a/libraries/stdlib/api/js/kotlin.collections.kt +++ b/libraries/stdlib/api/js/kotlin.collections.kt @@ -1044,9 +1044,11 @@ public operator fun kotlin.ByteArray.contains(element: kotlin.Byte): kotlin.Bool public operator fun kotlin.CharArray.contains(element: kotlin.Char): kotlin.Boolean @kotlin.Deprecated(message = "The function has unclear behavior when searching for NaN or zero values and will be removed soon. Use 'any { it == element }' instead to continue using this behavior, or '.asList().contains(element: T)' to get the same search behavior as in a list.", replaceWith = kotlin.ReplaceWith(expression = "any { it == element }", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.4") public operator fun kotlin.DoubleArray.contains(element: kotlin.Double): kotlin.Boolean @kotlin.Deprecated(message = "The function has unclear behavior when searching for NaN or zero values and will be removed soon. Use 'any { it == element }' instead to continue using this behavior, or '.asList().contains(element: T)' to get the same search behavior as in a list.", replaceWith = kotlin.ReplaceWith(expression = "any { it == element }", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.4") public operator fun kotlin.FloatArray.contains(element: kotlin.Float): kotlin.Boolean public operator fun kotlin.IntArray.contains(element: kotlin.Int): kotlin.Boolean @@ -3457,9 +3459,11 @@ public fun kotlin.ByteArray.indexOf(element: kotlin.Byte): kotlin.Int public fun kotlin.CharArray.indexOf(element: kotlin.Char): kotlin.Int @kotlin.Deprecated(message = "The function has unclear behavior when searching for NaN or zero values and will be removed soon. Use 'indexOfFirst { it == element }' instead to continue using this behavior, or '.asList().indexOf(element: T)' to get the same search behavior as in a list.", replaceWith = kotlin.ReplaceWith(expression = "indexOfFirst { it == element }", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.4") public fun kotlin.DoubleArray.indexOf(element: kotlin.Double): kotlin.Int @kotlin.Deprecated(message = "The function has unclear behavior when searching for NaN or zero values and will be removed soon. Use 'indexOfFirst { it == element }' instead to continue using this behavior, or '.asList().indexOf(element: T)' to get the same search behavior as in a list.", replaceWith = kotlin.ReplaceWith(expression = "indexOfFirst { it == element }", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.4") public fun kotlin.FloatArray.indexOf(element: kotlin.Float): kotlin.Int public fun kotlin.IntArray.indexOf(element: kotlin.Int): kotlin.Int @@ -3814,9 +3818,11 @@ public fun kotlin.ByteArray.lastIndexOf(element: kotlin.Byte): kotlin.Int public fun kotlin.CharArray.lastIndexOf(element: kotlin.Char): kotlin.Int @kotlin.Deprecated(message = "The function has unclear behavior when searching for NaN or zero values and will be removed soon. Use 'indexOfLast { it == element }' instead to continue using this behavior, or '.asList().lastIndexOf(element: T)' to get the same search behavior as in a list.", replaceWith = kotlin.ReplaceWith(expression = "indexOfLast { it == element }", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.4") public fun kotlin.DoubleArray.lastIndexOf(element: kotlin.Double): kotlin.Int @kotlin.Deprecated(message = "The function has unclear behavior when searching for NaN or zero values and will be removed soon. Use 'indexOfLast { it == element }' instead to continue using this behavior, or '.asList().lastIndexOf(element: T)' to get the same search behavior as in a list.", replaceWith = kotlin.ReplaceWith(expression = "indexOfLast { it == element }", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.4") public fun kotlin.FloatArray.lastIndexOf(element: kotlin.Float): kotlin.Int public fun kotlin.IntArray.lastIndexOf(element: kotlin.Int): kotlin.Int diff --git a/libraries/stdlib/api/js/kotlin.ranges.kt b/libraries/stdlib/api/js/kotlin.ranges.kt index 46df3217170..85d8fc0a470 100644 --- a/libraries/stdlib/api/js/kotlin.ranges.kt +++ b/libraries/stdlib/api/js/kotlin.ranges.kt @@ -113,11 +113,13 @@ public inline operator fun > @kotlin.internal.InlineOnly public inline operator fun kotlin.ranges.CharRange.contains(element: kotlin.Char?): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "byteRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Double): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "byteRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Float): kotlin.Boolean @@ -130,52 +132,62 @@ public operator fun kotlin.ranges.ClosedRange.contains(value: kotli @kotlin.jvm.JvmName(name = "byteRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Short): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "doubleRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Byte): kotlin.Boolean @kotlin.jvm.JvmName(name = "doubleRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Float): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "doubleRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Int): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "doubleRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Long): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "doubleRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Short): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "floatRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Byte): kotlin.Boolean @kotlin.jvm.JvmName(name = "floatRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Double): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "floatRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Int): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "floatRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Long): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "floatRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Short): kotlin.Boolean @kotlin.jvm.JvmName(name = "intRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Byte): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "intRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Double): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "intRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Float): kotlin.Boolean @@ -188,11 +200,13 @@ public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin @kotlin.jvm.JvmName(name = "longRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Byte): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "longRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Double): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "longRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Float): kotlin.Boolean @@ -205,11 +219,13 @@ public operator fun kotlin.ranges.ClosedRange.contains(value: kotli @kotlin.jvm.JvmName(name = "shortRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Byte): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "shortRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Double): kotlin.Boolean -@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.Deprecated(message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", warningSince = "1.3") @kotlin.jvm.JvmName(name = "shortRangeContains") public operator fun kotlin.ranges.ClosedRange.contains(value: kotlin.Float): kotlin.Boolean diff --git a/libraries/stdlib/common/src/generated/_Arrays.kt b/libraries/stdlib/common/src/generated/_Arrays.kt index 6bae35385f3..0947466f558 100644 --- a/libraries/stdlib/common/src/generated/_Arrays.kt +++ b/libraries/stdlib/common/src/generated/_Arrays.kt @@ -551,6 +551,7 @@ public operator fun LongArray.contains(element: Long): Boolean { * Returns `true` if [element] is found in the array. */ @Deprecated("The function has unclear behavior when searching for NaN or zero values and will be removed soon. Use 'any { it == element }' instead to continue using this behavior, or '.asList().contains(element: T)' to get the same search behavior as in a list.", ReplaceWith("any { it == element }")) +@DeprecatedSinceKotlin(warningSince = "1.4") @Suppress("DEPRECATION") public operator fun FloatArray.contains(element: Float): Boolean { return indexOf(element) >= 0 @@ -560,6 +561,7 @@ public operator fun FloatArray.contains(element: Float): Boolean { * Returns `true` if [element] is found in the array. */ @Deprecated("The function has unclear behavior when searching for NaN or zero values and will be removed soon. Use 'any { it == element }' instead to continue using this behavior, or '.asList().contains(element: T)' to get the same search behavior as in a list.", ReplaceWith("any { it == element }")) +@DeprecatedSinceKotlin(warningSince = "1.4") @Suppress("DEPRECATION") public operator fun DoubleArray.contains(element: Double): Boolean { return indexOf(element) >= 0 @@ -1479,6 +1481,7 @@ public fun LongArray.indexOf(element: Long): Int { * Returns first index of [element], or -1 if the array does not contain element. */ @Deprecated("The function has unclear behavior when searching for NaN or zero values and will be removed soon. Use 'indexOfFirst { it == element }' instead to continue using this behavior, or '.asList().indexOf(element: T)' to get the same search behavior as in a list.", ReplaceWith("indexOfFirst { it == element }")) +@DeprecatedSinceKotlin(warningSince = "1.4") public fun FloatArray.indexOf(element: Float): Int { for (index in indices) { if (element == this[index]) { @@ -1492,6 +1495,7 @@ public fun FloatArray.indexOf(element: Float): Int { * Returns first index of [element], or -1 if the array does not contain element. */ @Deprecated("The function has unclear behavior when searching for NaN or zero values and will be removed soon. Use 'indexOfFirst { it == element }' instead to continue using this behavior, or '.asList().indexOf(element: T)' to get the same search behavior as in a list.", ReplaceWith("indexOfFirst { it == element }")) +@DeprecatedSinceKotlin(warningSince = "1.4") public fun DoubleArray.indexOf(element: Double): Int { for (index in indices) { if (element == this[index]) { @@ -2011,6 +2015,7 @@ public fun LongArray.lastIndexOf(element: Long): Int { * Returns last index of [element], or -1 if the array does not contain element. */ @Deprecated("The function has unclear behavior when searching for NaN or zero values and will be removed soon. Use 'indexOfLast { it == element }' instead to continue using this behavior, or '.asList().lastIndexOf(element: T)' to get the same search behavior as in a list.", ReplaceWith("indexOfLast { it == element }")) +@DeprecatedSinceKotlin(warningSince = "1.4") public fun FloatArray.lastIndexOf(element: Float): Int { for (index in indices.reversed()) { if (element == this[index]) { @@ -2024,6 +2029,7 @@ public fun FloatArray.lastIndexOf(element: Float): Int { * Returns last index of [element], or -1 if the array does not contain element. */ @Deprecated("The function has unclear behavior when searching for NaN or zero values and will be removed soon. Use 'indexOfLast { it == element }' instead to continue using this behavior, or '.asList().lastIndexOf(element: T)' to get the same search behavior as in a list.", ReplaceWith("indexOfLast { it == element }")) +@DeprecatedSinceKotlin(warningSince = "1.4") public fun DoubleArray.lastIndexOf(element: Double): Int { for (index in indices.reversed()) { if (element == this[index]) { diff --git a/libraries/stdlib/common/src/generated/_Ranges.kt b/libraries/stdlib/common/src/generated/_Ranges.kt index dbcda7d95d5..3c59a49aec9 100644 --- a/libraries/stdlib/common/src/generated/_Ranges.kt +++ b/libraries/stdlib/common/src/generated/_Ranges.kt @@ -213,7 +213,8 @@ public operator fun ClosedRange.contains(value: Byte): Boolean { /** * Checks if the specified [value] belongs to this range. */ -@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR) +@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4") @kotlin.jvm.JvmName("doubleRangeContains") public operator fun ClosedRange.contains(value: Byte): Boolean { return contains(value.toDouble()) @@ -222,7 +223,8 @@ public operator fun ClosedRange.contains(value: Byte): Boolean { /** * Checks if the specified [value] belongs to this range. */ -@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR) +@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4") @kotlin.jvm.JvmName("floatRangeContains") public operator fun ClosedRange.contains(value: Byte): Boolean { return contains(value.toFloat()) @@ -231,7 +233,8 @@ public operator fun ClosedRange.contains(value: Byte): Boolean { /** * Checks if the specified [value] belongs to this range. */ -@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR) +@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4") @kotlin.jvm.JvmName("intRangeContains") public operator fun ClosedRange.contains(value: Double): Boolean { return value.toIntExactOrNull().let { if (it != null) contains(it) else false } @@ -240,7 +243,8 @@ public operator fun ClosedRange.contains(value: Double): Boolean { /** * Checks if the specified [value] belongs to this range. */ -@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR) +@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4") @kotlin.jvm.JvmName("longRangeContains") public operator fun ClosedRange.contains(value: Double): Boolean { return value.toLongExactOrNull().let { if (it != null) contains(it) else false } @@ -249,7 +253,8 @@ public operator fun ClosedRange.contains(value: Double): Boolean { /** * Checks if the specified [value] belongs to this range. */ -@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR) +@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4") @kotlin.jvm.JvmName("byteRangeContains") public operator fun ClosedRange.contains(value: Double): Boolean { return value.toByteExactOrNull().let { if (it != null) contains(it) else false } @@ -258,7 +263,8 @@ public operator fun ClosedRange.contains(value: Double): Boolean { /** * Checks if the specified [value] belongs to this range. */ -@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR) +@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4") @kotlin.jvm.JvmName("shortRangeContains") public operator fun ClosedRange.contains(value: Double): Boolean { return value.toShortExactOrNull().let { if (it != null) contains(it) else false } @@ -275,7 +281,8 @@ public operator fun ClosedRange.contains(value: Double): Boolean { /** * Checks if the specified [value] belongs to this range. */ -@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR) +@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4") @kotlin.jvm.JvmName("intRangeContains") public operator fun ClosedRange.contains(value: Float): Boolean { return value.toIntExactOrNull().let { if (it != null) contains(it) else false } @@ -284,7 +291,8 @@ public operator fun ClosedRange.contains(value: Float): Boolean { /** * Checks if the specified [value] belongs to this range. */ -@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR) +@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4") @kotlin.jvm.JvmName("longRangeContains") public operator fun ClosedRange.contains(value: Float): Boolean { return value.toLongExactOrNull().let { if (it != null) contains(it) else false } @@ -293,7 +301,8 @@ public operator fun ClosedRange.contains(value: Float): Boolean { /** * Checks if the specified [value] belongs to this range. */ -@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR) +@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4") @kotlin.jvm.JvmName("byteRangeContains") public operator fun ClosedRange.contains(value: Float): Boolean { return value.toByteExactOrNull().let { if (it != null) contains(it) else false } @@ -302,7 +311,8 @@ public operator fun ClosedRange.contains(value: Float): Boolean { /** * Checks if the specified [value] belongs to this range. */ -@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR) +@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4") @kotlin.jvm.JvmName("shortRangeContains") public operator fun ClosedRange.contains(value: Float): Boolean { return value.toShortExactOrNull().let { if (it != null) contains(it) else false } @@ -343,7 +353,8 @@ public operator fun ClosedRange.contains(value: Int): Boolean { /** * Checks if the specified [value] belongs to this range. */ -@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR) +@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4") @kotlin.jvm.JvmName("doubleRangeContains") public operator fun ClosedRange.contains(value: Int): Boolean { return contains(value.toDouble()) @@ -352,7 +363,8 @@ public operator fun ClosedRange.contains(value: Int): Boolean { /** * Checks if the specified [value] belongs to this range. */ -@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR) +@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4") @kotlin.jvm.JvmName("floatRangeContains") public operator fun ClosedRange.contains(value: Int): Boolean { return contains(value.toFloat()) @@ -385,7 +397,8 @@ public operator fun ClosedRange.contains(value: Long): Boolean { /** * Checks if the specified [value] belongs to this range. */ -@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR) +@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4") @kotlin.jvm.JvmName("doubleRangeContains") public operator fun ClosedRange.contains(value: Long): Boolean { return contains(value.toDouble()) @@ -394,7 +407,8 @@ public operator fun ClosedRange.contains(value: Long): Boolean { /** * Checks if the specified [value] belongs to this range. */ -@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR) +@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4") @kotlin.jvm.JvmName("floatRangeContains") public operator fun ClosedRange.contains(value: Long): Boolean { return contains(value.toFloat()) @@ -427,7 +441,8 @@ public operator fun ClosedRange.contains(value: Short): Boolean { /** * Checks if the specified [value] belongs to this range. */ -@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR) +@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4") @kotlin.jvm.JvmName("doubleRangeContains") public operator fun ClosedRange.contains(value: Short): Boolean { return contains(value.toDouble()) @@ -436,7 +451,8 @@ public operator fun ClosedRange.contains(value: Short): Boolean { /** * Checks if the specified [value] belongs to this range. */ -@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR) +@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.") +@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4") @kotlin.jvm.JvmName("floatRangeContains") public operator fun ClosedRange.contains(value: Short): Boolean { return contains(value.toFloat()) diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/Elements.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/Elements.kt index a1ddcd96f39..e645c30dacd 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/Elements.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/Elements.kt @@ -40,7 +40,8 @@ object Elements : TemplateGroupBase() { typeParam("@kotlin.internal.OnlyInputTypes T") if (f == ArraysOfPrimitives && primitive!!.isFloatingPoint()) { val replacement = "any { it == element }" - deprecate(Deprecation(floatingSearchDeprecationMessage(signature, replacement), replacement, DeprecationLevel.WARNING)) + val message = floatingSearchDeprecationMessage(signature, replacement) + deprecate(Deprecation(message, replacement, warningSince = "1.4")) annotation("""@Suppress("DEPRECATION")""") } returns("Boolean") @@ -68,7 +69,8 @@ object Elements : TemplateGroupBase() { } if (f == ArraysOfPrimitives && primitive!!.isFloatingPoint()) { val replacement = "indexOfFirst { it == element }" - deprecate(Deprecation(floatingSearchDeprecationMessage(signature, replacement), replacement, DeprecationLevel.WARNING)) + val message = floatingSearchDeprecationMessage(signature, replacement) + deprecate(Deprecation(message, replacement, warningSince = "1.4")) } returns("Int") body { @@ -132,7 +134,8 @@ object Elements : TemplateGroupBase() { } if (f == ArraysOfPrimitives && primitive!!.isFloatingPoint()) { val replacement = "indexOfLast { it == element }" - deprecate(Deprecation(floatingSearchDeprecationMessage(signature, replacement), replacement, DeprecationLevel.WARNING)) + val message = floatingSearchDeprecationMessage(signature, replacement) + deprecate(Deprecation(message, replacement, warningSince = "1.4")) } returns("Int") body { diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/Ranges.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/Ranges.kt index 44f7c29572d..776c1767668 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/Ranges.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/Ranges.kt @@ -159,7 +159,8 @@ object RangeOps : TemplateGroupBase() { check(rangeType.isNumeric() == itemType.isNumeric()) { "Required rangeType and itemType both to be numeric or both not, got: $rangeType, $itemType" } if (rangeType.isIntegral() != itemType.isIntegral()) { - deprecate(Deprecation("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR)) + val message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed." + deprecate(Deprecation(message, warningSince = "1.3", errorSince = "1.4")) } platformName("${rangeType.name.decapitalize()}RangeContains")