Advance deprecation level of mixed Int/FP overloads of ClosedRange.contains to HIDDEN KT-22423

This commit is contained in:
Abduqodiri Qurbonzoda
2021-03-26 01:55:25 +03:00
parent 7a6cddf6fe
commit d9ab96126d
6 changed files with 65 additions and 95 deletions
+16 -16
View File
@@ -114,12 +114,12 @@ public inline operator fun <T : kotlin.Any, R : kotlin.collections.Iterable<T>>
public inline operator fun kotlin.ranges.CharRange.contains(element: kotlin.Char?): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "byteRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Byte>.contains(value: kotlin.Double): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "byteRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Byte>.contains(value: kotlin.Float): kotlin.Boolean
@@ -133,7 +133,7 @@ public operator fun kotlin.ranges.ClosedRange<kotlin.Byte>.contains(value: kotli
public operator fun kotlin.ranges.ClosedRange<kotlin.Byte>.contains(value: kotlin.Short): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "doubleRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Double>.contains(value: kotlin.Byte): kotlin.Boolean
@@ -141,22 +141,22 @@ public operator fun kotlin.ranges.ClosedRange<kotlin.Double>.contains(value: kot
public operator fun kotlin.ranges.ClosedRange<kotlin.Double>.contains(value: kotlin.Float): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "doubleRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Double>.contains(value: kotlin.Int): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "doubleRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Double>.contains(value: kotlin.Long): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "doubleRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Double>.contains(value: kotlin.Short): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "floatRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Float>.contains(value: kotlin.Byte): kotlin.Boolean
@@ -164,17 +164,17 @@ public operator fun kotlin.ranges.ClosedRange<kotlin.Float>.contains(value: kotl
public operator fun kotlin.ranges.ClosedRange<kotlin.Float>.contains(value: kotlin.Double): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "floatRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Float>.contains(value: kotlin.Int): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "floatRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Float>.contains(value: kotlin.Long): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "floatRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Float>.contains(value: kotlin.Short): kotlin.Boolean
@@ -182,12 +182,12 @@ public operator fun kotlin.ranges.ClosedRange<kotlin.Float>.contains(value: kotl
public operator fun kotlin.ranges.ClosedRange<kotlin.Int>.contains(value: kotlin.Byte): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "intRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Int>.contains(value: kotlin.Double): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "intRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Int>.contains(value: kotlin.Float): kotlin.Boolean
@@ -201,12 +201,12 @@ public operator fun kotlin.ranges.ClosedRange<kotlin.Int>.contains(value: kotlin
public operator fun kotlin.ranges.ClosedRange<kotlin.Long>.contains(value: kotlin.Byte): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "longRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Long>.contains(value: kotlin.Double): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "longRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Long>.contains(value: kotlin.Float): kotlin.Boolean
@@ -220,12 +220,12 @@ public operator fun kotlin.ranges.ClosedRange<kotlin.Long>.contains(value: kotli
public operator fun kotlin.ranges.ClosedRange<kotlin.Short>.contains(value: kotlin.Byte): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "shortRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Short>.contains(value: kotlin.Double): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "shortRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Short>.contains(value: kotlin.Float): kotlin.Boolean
+16 -16
View File
@@ -114,12 +114,12 @@ public inline operator fun <T : kotlin.Any, R : kotlin.collections.Iterable<T>>
public inline operator fun kotlin.ranges.CharRange.contains(element: kotlin.Char?): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "byteRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Byte>.contains(value: kotlin.Double): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "byteRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Byte>.contains(value: kotlin.Float): kotlin.Boolean
@@ -133,7 +133,7 @@ public operator fun kotlin.ranges.ClosedRange<kotlin.Byte>.contains(value: kotli
public operator fun kotlin.ranges.ClosedRange<kotlin.Byte>.contains(value: kotlin.Short): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "doubleRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Double>.contains(value: kotlin.Byte): kotlin.Boolean
@@ -141,22 +141,22 @@ public operator fun kotlin.ranges.ClosedRange<kotlin.Double>.contains(value: kot
public operator fun kotlin.ranges.ClosedRange<kotlin.Double>.contains(value: kotlin.Float): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "doubleRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Double>.contains(value: kotlin.Int): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "doubleRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Double>.contains(value: kotlin.Long): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "doubleRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Double>.contains(value: kotlin.Short): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "floatRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Float>.contains(value: kotlin.Byte): kotlin.Boolean
@@ -164,17 +164,17 @@ public operator fun kotlin.ranges.ClosedRange<kotlin.Float>.contains(value: kotl
public operator fun kotlin.ranges.ClosedRange<kotlin.Float>.contains(value: kotlin.Double): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "floatRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Float>.contains(value: kotlin.Int): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "floatRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Float>.contains(value: kotlin.Long): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "floatRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Float>.contains(value: kotlin.Short): kotlin.Boolean
@@ -182,12 +182,12 @@ public operator fun kotlin.ranges.ClosedRange<kotlin.Float>.contains(value: kotl
public operator fun kotlin.ranges.ClosedRange<kotlin.Int>.contains(value: kotlin.Byte): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "intRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Int>.contains(value: kotlin.Double): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "intRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Int>.contains(value: kotlin.Float): kotlin.Boolean
@@ -201,12 +201,12 @@ public operator fun kotlin.ranges.ClosedRange<kotlin.Int>.contains(value: kotlin
public operator fun kotlin.ranges.ClosedRange<kotlin.Long>.contains(value: kotlin.Byte): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "longRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Long>.contains(value: kotlin.Double): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "longRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Long>.contains(value: kotlin.Float): kotlin.Boolean
@@ -220,12 +220,12 @@ public operator fun kotlin.ranges.ClosedRange<kotlin.Long>.contains(value: kotli
public operator fun kotlin.ranges.ClosedRange<kotlin.Short>.contains(value: kotlin.Byte): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "shortRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Short>.contains(value: kotlin.Double): kotlin.Boolean
@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.DeprecatedSinceKotlin(errorSince = "1.4", hiddenSince = "1.5", warningSince = "1.3")
@kotlin.jvm.JvmName(name = "shortRangeContains")
public operator fun kotlin.ranges.ClosedRange<kotlin.Short>.contains(value: kotlin.Float): kotlin.Boolean
@@ -214,7 +214,7 @@ public operator fun ClosedRange<Short>.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.")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4", hiddenSince = "1.5")
@kotlin.jvm.JvmName("doubleRangeContains")
public operator fun ClosedRange<Double>.contains(value: Byte): Boolean {
return contains(value.toDouble())
@@ -224,7 +224,7 @@ public operator fun ClosedRange<Double>.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.")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4", hiddenSince = "1.5")
@kotlin.jvm.JvmName("floatRangeContains")
public operator fun ClosedRange<Float>.contains(value: Byte): Boolean {
return contains(value.toFloat())
@@ -234,7 +234,7 @@ public operator fun ClosedRange<Float>.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.")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4", hiddenSince = "1.5")
@kotlin.jvm.JvmName("intRangeContains")
public operator fun ClosedRange<Int>.contains(value: Double): Boolean {
return value.toIntExactOrNull().let { if (it != null) contains(it) else false }
@@ -244,7 +244,7 @@ public operator fun ClosedRange<Int>.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.")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4", hiddenSince = "1.5")
@kotlin.jvm.JvmName("longRangeContains")
public operator fun ClosedRange<Long>.contains(value: Double): Boolean {
return value.toLongExactOrNull().let { if (it != null) contains(it) else false }
@@ -254,7 +254,7 @@ public operator fun ClosedRange<Long>.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.")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4", hiddenSince = "1.5")
@kotlin.jvm.JvmName("byteRangeContains")
public operator fun ClosedRange<Byte>.contains(value: Double): Boolean {
return value.toByteExactOrNull().let { if (it != null) contains(it) else false }
@@ -264,7 +264,7 @@ public operator fun ClosedRange<Byte>.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.")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4", hiddenSince = "1.5")
@kotlin.jvm.JvmName("shortRangeContains")
public operator fun ClosedRange<Short>.contains(value: Double): Boolean {
return value.toShortExactOrNull().let { if (it != null) contains(it) else false }
@@ -282,7 +282,7 @@ public operator fun ClosedRange<Float>.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.")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4", hiddenSince = "1.5")
@kotlin.jvm.JvmName("intRangeContains")
public operator fun ClosedRange<Int>.contains(value: Float): Boolean {
return value.toIntExactOrNull().let { if (it != null) contains(it) else false }
@@ -292,7 +292,7 @@ public operator fun ClosedRange<Int>.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.")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4", hiddenSince = "1.5")
@kotlin.jvm.JvmName("longRangeContains")
public operator fun ClosedRange<Long>.contains(value: Float): Boolean {
return value.toLongExactOrNull().let { if (it != null) contains(it) else false }
@@ -302,7 +302,7 @@ public operator fun ClosedRange<Long>.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.")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4", hiddenSince = "1.5")
@kotlin.jvm.JvmName("byteRangeContains")
public operator fun ClosedRange<Byte>.contains(value: Float): Boolean {
return value.toByteExactOrNull().let { if (it != null) contains(it) else false }
@@ -312,7 +312,7 @@ public operator fun ClosedRange<Byte>.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.")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4", hiddenSince = "1.5")
@kotlin.jvm.JvmName("shortRangeContains")
public operator fun ClosedRange<Short>.contains(value: Float): Boolean {
return value.toShortExactOrNull().let { if (it != null) contains(it) else false }
@@ -354,7 +354,7 @@ public operator fun ClosedRange<Short>.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.")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4", hiddenSince = "1.5")
@kotlin.jvm.JvmName("doubleRangeContains")
public operator fun ClosedRange<Double>.contains(value: Int): Boolean {
return contains(value.toDouble())
@@ -364,7 +364,7 @@ public operator fun ClosedRange<Double>.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.")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4", hiddenSince = "1.5")
@kotlin.jvm.JvmName("floatRangeContains")
public operator fun ClosedRange<Float>.contains(value: Int): Boolean {
return contains(value.toFloat())
@@ -398,7 +398,7 @@ public operator fun ClosedRange<Short>.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.")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4", hiddenSince = "1.5")
@kotlin.jvm.JvmName("doubleRangeContains")
public operator fun ClosedRange<Double>.contains(value: Long): Boolean {
return contains(value.toDouble())
@@ -408,7 +408,7 @@ public operator fun ClosedRange<Double>.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.")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4", hiddenSince = "1.5")
@kotlin.jvm.JvmName("floatRangeContains")
public operator fun ClosedRange<Float>.contains(value: Long): Boolean {
return contains(value.toFloat())
@@ -442,7 +442,7 @@ public operator fun ClosedRange<Byte>.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.")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4", hiddenSince = "1.5")
@kotlin.jvm.JvmName("doubleRangeContains")
public operator fun ClosedRange<Double>.contains(value: Short): Boolean {
return contains(value.toDouble())
@@ -452,7 +452,7 @@ public operator fun ClosedRange<Double>.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.")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4")
@DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.4", hiddenSince = "1.5")
@kotlin.jvm.JvmName("floatRangeContains")
public operator fun ClosedRange<Float>.contains(value: Short): Boolean {
return contains(value.toFloat())
-30
View File
@@ -31,10 +31,6 @@ public class RangeTest {
assertTrue(1.toShort() in range)
assertTrue(1.toByte() in range)
assertTrue(1.toLong() in range)
run @Suppress("DEPRECATION_ERROR") {
assertTrue(1.toFloat() in range)
assertTrue(1.toDouble() in range)
}
assertFalse(Long.MAX_VALUE in range)
@@ -70,10 +66,6 @@ public class RangeTest {
assertTrue(1.toShort() in range)
assertTrue(1.toInt() in range)
assertTrue(1.toLong() in range)
run @Suppress("DEPRECATION_ERROR") {
assertTrue(1.toFloat() in range)
assertTrue(1.toDouble() in range)
}
assertFalse(Long.MAX_VALUE in range)
@@ -108,10 +100,6 @@ public class RangeTest {
assertTrue(1.toByte() in range)
assertTrue(1.toInt() in range)
assertTrue(1.toLong() in range)
run @Suppress("DEPRECATION_ERROR") {
assertTrue(1.toFloat() in range)
assertTrue(1.toDouble() in range)
}
assertFalse(Long.MAX_VALUE in range)
@@ -148,12 +136,6 @@ public class RangeTest {
assertTrue(1.toByte() in range)
assertTrue(1.toShort() in range)
assertTrue(1.toInt() in range)
run @Suppress("DEPRECATION_ERROR") {
assertTrue(1.toFloat() in range)
assertTrue(1.toDouble() in range)
assertFalse(Double.MAX_VALUE in range)
}
assertFalse(null in range)
assertTrue(1L as Long? in range)
@@ -218,12 +200,6 @@ public class RangeTest {
assertFalse(range.isEmpty())
run @Suppress("DEPRECATION_ERROR") {
assertTrue(1.toByte() in range)
assertTrue(1.toShort() in range)
assertTrue(1.toInt() in range)
assertTrue(1.toLong() in range)
}
assertTrue(1.toFloat() in range)
val zeroRange = 0.0..-0.0
@@ -266,12 +242,6 @@ public class RangeTest {
assertFalse(range.isEmpty())
run @Suppress("DEPRECATION_ERROR") {
assertTrue(1.toByte() in range)
assertTrue(1.toShort() in range)
assertTrue(1.toInt() in range)
assertTrue(1.toLong() in range)
}
assertTrue(1.toDouble() in range)
assertFalse(Double.MAX_VALUE in range)