Deprecate with error mixed Int/FP contains operator for ranges KT-22423
This commit is contained in:
@@ -113,11 +113,11 @@ public inline operator fun <T : kotlin.Any, R : kotlin.collections.Iterable<T>>
|
||||
@kotlin.internal.InlineOnly
|
||||
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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@kotlin.jvm.JvmName(name = "byteRangeContains")
|
||||
public operator fun kotlin.ranges.ClosedRange<kotlin.Byte>.contains(value: kotlin.Float): kotlin.Boolean
|
||||
|
||||
@@ -130,52 +130,52 @@ public operator fun kotlin.ranges.ClosedRange<kotlin.Byte>.contains(value: kotli
|
||||
@kotlin.jvm.JvmName(name = "byteRangeContains")
|
||||
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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@kotlin.jvm.JvmName(name = "doubleRangeContains")
|
||||
public operator fun kotlin.ranges.ClosedRange<kotlin.Double>.contains(value: kotlin.Byte): kotlin.Boolean
|
||||
|
||||
@kotlin.jvm.JvmName(name = "doubleRangeContains")
|
||||
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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@kotlin.jvm.JvmName(name = "floatRangeContains")
|
||||
public operator fun kotlin.ranges.ClosedRange<kotlin.Float>.contains(value: kotlin.Byte): kotlin.Boolean
|
||||
|
||||
@kotlin.jvm.JvmName(name = "floatRangeContains")
|
||||
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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@kotlin.jvm.JvmName(name = "floatRangeContains")
|
||||
public operator fun kotlin.ranges.ClosedRange<kotlin.Float>.contains(value: kotlin.Short): kotlin.Boolean
|
||||
|
||||
@kotlin.jvm.JvmName(name = "intRangeContains")
|
||||
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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@kotlin.jvm.JvmName(name = "intRangeContains")
|
||||
public operator fun kotlin.ranges.ClosedRange<kotlin.Int>.contains(value: kotlin.Float): kotlin.Boolean
|
||||
|
||||
@@ -188,11 +188,11 @@ public operator fun kotlin.ranges.ClosedRange<kotlin.Int>.contains(value: kotlin
|
||||
@kotlin.jvm.JvmName(name = "longRangeContains")
|
||||
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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@kotlin.jvm.JvmName(name = "longRangeContains")
|
||||
public operator fun kotlin.ranges.ClosedRange<kotlin.Long>.contains(value: kotlin.Float): kotlin.Boolean
|
||||
|
||||
@@ -205,11 +205,11 @@ public operator fun kotlin.ranges.ClosedRange<kotlin.Long>.contains(value: kotli
|
||||
@kotlin.jvm.JvmName(name = "shortRangeContains")
|
||||
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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@kotlin.jvm.JvmName(name = "shortRangeContains")
|
||||
public operator fun kotlin.ranges.ClosedRange<kotlin.Short>.contains(value: kotlin.Float): kotlin.Boolean
|
||||
|
||||
|
||||
@@ -113,11 +113,11 @@ public inline operator fun <T : kotlin.Any, R : kotlin.collections.Iterable<T>>
|
||||
@kotlin.internal.InlineOnly
|
||||
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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@kotlin.jvm.JvmName(name = "byteRangeContains")
|
||||
public operator fun kotlin.ranges.ClosedRange<kotlin.Byte>.contains(value: kotlin.Float): kotlin.Boolean
|
||||
|
||||
@@ -130,52 +130,52 @@ public operator fun kotlin.ranges.ClosedRange<kotlin.Byte>.contains(value: kotli
|
||||
@kotlin.jvm.JvmName(name = "byteRangeContains")
|
||||
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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@kotlin.jvm.JvmName(name = "doubleRangeContains")
|
||||
public operator fun kotlin.ranges.ClosedRange<kotlin.Double>.contains(value: kotlin.Byte): kotlin.Boolean
|
||||
|
||||
@kotlin.jvm.JvmName(name = "doubleRangeContains")
|
||||
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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@kotlin.jvm.JvmName(name = "floatRangeContains")
|
||||
public operator fun kotlin.ranges.ClosedRange<kotlin.Float>.contains(value: kotlin.Byte): kotlin.Boolean
|
||||
|
||||
@kotlin.jvm.JvmName(name = "floatRangeContains")
|
||||
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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@kotlin.jvm.JvmName(name = "floatRangeContains")
|
||||
public operator fun kotlin.ranges.ClosedRange<kotlin.Float>.contains(value: kotlin.Short): kotlin.Boolean
|
||||
|
||||
@kotlin.jvm.JvmName(name = "intRangeContains")
|
||||
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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@kotlin.jvm.JvmName(name = "intRangeContains")
|
||||
public operator fun kotlin.ranges.ClosedRange<kotlin.Int>.contains(value: kotlin.Float): kotlin.Boolean
|
||||
|
||||
@@ -188,11 +188,11 @@ public operator fun kotlin.ranges.ClosedRange<kotlin.Int>.contains(value: kotlin
|
||||
@kotlin.jvm.JvmName(name = "longRangeContains")
|
||||
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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@kotlin.jvm.JvmName(name = "longRangeContains")
|
||||
public operator fun kotlin.ranges.ClosedRange<kotlin.Long>.contains(value: kotlin.Float): kotlin.Boolean
|
||||
|
||||
@@ -205,11 +205,11 @@ public operator fun kotlin.ranges.ClosedRange<kotlin.Long>.contains(value: kotli
|
||||
@kotlin.jvm.JvmName(name = "shortRangeContains")
|
||||
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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@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.Deprecated(level = DeprecationLevel.ERROR, message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.")
|
||||
@kotlin.jvm.JvmName(name = "shortRangeContains")
|
||||
public operator fun kotlin.ranges.ClosedRange<kotlin.Short>.contains(value: kotlin.Float): kotlin.Boolean
|
||||
|
||||
|
||||
@@ -213,7 +213,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.")
|
||||
@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR)
|
||||
@kotlin.jvm.JvmName("doubleRangeContains")
|
||||
public operator fun ClosedRange<Double>.contains(value: Byte): Boolean {
|
||||
return contains(value.toDouble())
|
||||
@@ -222,7 +222,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.")
|
||||
@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR)
|
||||
@kotlin.jvm.JvmName("floatRangeContains")
|
||||
public operator fun ClosedRange<Float>.contains(value: Byte): Boolean {
|
||||
return contains(value.toFloat())
|
||||
@@ -231,7 +231,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.")
|
||||
@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR)
|
||||
@kotlin.jvm.JvmName("intRangeContains")
|
||||
public operator fun ClosedRange<Int>.contains(value: Double): Boolean {
|
||||
return value.toIntExactOrNull().let { if (it != null) contains(it) else false }
|
||||
@@ -240,7 +240,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.")
|
||||
@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR)
|
||||
@kotlin.jvm.JvmName("longRangeContains")
|
||||
public operator fun ClosedRange<Long>.contains(value: Double): Boolean {
|
||||
return value.toLongExactOrNull().let { if (it != null) contains(it) else false }
|
||||
@@ -249,7 +249,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.")
|
||||
@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR)
|
||||
@kotlin.jvm.JvmName("byteRangeContains")
|
||||
public operator fun ClosedRange<Byte>.contains(value: Double): Boolean {
|
||||
return value.toByteExactOrNull().let { if (it != null) contains(it) else false }
|
||||
@@ -258,7 +258,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.")
|
||||
@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR)
|
||||
@kotlin.jvm.JvmName("shortRangeContains")
|
||||
public operator fun ClosedRange<Short>.contains(value: Double): Boolean {
|
||||
return value.toShortExactOrNull().let { if (it != null) contains(it) else false }
|
||||
@@ -275,7 +275,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.")
|
||||
@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR)
|
||||
@kotlin.jvm.JvmName("intRangeContains")
|
||||
public operator fun ClosedRange<Int>.contains(value: Float): Boolean {
|
||||
return value.toIntExactOrNull().let { if (it != null) contains(it) else false }
|
||||
@@ -284,7 +284,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.")
|
||||
@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR)
|
||||
@kotlin.jvm.JvmName("longRangeContains")
|
||||
public operator fun ClosedRange<Long>.contains(value: Float): Boolean {
|
||||
return value.toLongExactOrNull().let { if (it != null) contains(it) else false }
|
||||
@@ -293,7 +293,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.")
|
||||
@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR)
|
||||
@kotlin.jvm.JvmName("byteRangeContains")
|
||||
public operator fun ClosedRange<Byte>.contains(value: Float): Boolean {
|
||||
return value.toByteExactOrNull().let { if (it != null) contains(it) else false }
|
||||
@@ -302,7 +302,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.")
|
||||
@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR)
|
||||
@kotlin.jvm.JvmName("shortRangeContains")
|
||||
public operator fun ClosedRange<Short>.contains(value: Float): Boolean {
|
||||
return value.toShortExactOrNull().let { if (it != null) contains(it) else false }
|
||||
@@ -343,7 +343,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.")
|
||||
@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR)
|
||||
@kotlin.jvm.JvmName("doubleRangeContains")
|
||||
public operator fun ClosedRange<Double>.contains(value: Int): Boolean {
|
||||
return contains(value.toDouble())
|
||||
@@ -352,7 +352,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.")
|
||||
@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR)
|
||||
@kotlin.jvm.JvmName("floatRangeContains")
|
||||
public operator fun ClosedRange<Float>.contains(value: Int): Boolean {
|
||||
return contains(value.toFloat())
|
||||
@@ -385,7 +385,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.")
|
||||
@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR)
|
||||
@kotlin.jvm.JvmName("doubleRangeContains")
|
||||
public operator fun ClosedRange<Double>.contains(value: Long): Boolean {
|
||||
return contains(value.toDouble())
|
||||
@@ -394,7 +394,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.")
|
||||
@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR)
|
||||
@kotlin.jvm.JvmName("floatRangeContains")
|
||||
public operator fun ClosedRange<Float>.contains(value: Long): Boolean {
|
||||
return contains(value.toFloat())
|
||||
@@ -427,7 +427,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.")
|
||||
@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR)
|
||||
@kotlin.jvm.JvmName("doubleRangeContains")
|
||||
public operator fun ClosedRange<Double>.contains(value: Short): Boolean {
|
||||
return contains(value.toDouble())
|
||||
@@ -436,7 +436,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.")
|
||||
@Deprecated("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR)
|
||||
@kotlin.jvm.JvmName("floatRangeContains")
|
||||
public operator fun ClosedRange<Float>.contains(value: Short): Boolean {
|
||||
return contains(value.toFloat())
|
||||
|
||||
@@ -31,7 +31,7 @@ public class RangeTest {
|
||||
assertTrue(1.toShort() in range)
|
||||
assertTrue(1.toByte() in range)
|
||||
assertTrue(1.toLong() in range)
|
||||
run @Suppress("DEPRECATION") {
|
||||
run @Suppress("DEPRECATION_ERROR") {
|
||||
assertTrue(1.toFloat() in range)
|
||||
assertTrue(1.toDouble() in range)
|
||||
}
|
||||
@@ -70,7 +70,7 @@ public class RangeTest {
|
||||
assertTrue(1.toShort() in range)
|
||||
assertTrue(1.toInt() in range)
|
||||
assertTrue(1.toLong() in range)
|
||||
run @Suppress("DEPRECATION") {
|
||||
run @Suppress("DEPRECATION_ERROR") {
|
||||
assertTrue(1.toFloat() in range)
|
||||
assertTrue(1.toDouble() in range)
|
||||
}
|
||||
@@ -108,7 +108,7 @@ public class RangeTest {
|
||||
assertTrue(1.toByte() in range)
|
||||
assertTrue(1.toInt() in range)
|
||||
assertTrue(1.toLong() in range)
|
||||
run @Suppress("DEPRECATION") {
|
||||
run @Suppress("DEPRECATION_ERROR") {
|
||||
assertTrue(1.toFloat() in range)
|
||||
assertTrue(1.toDouble() in range)
|
||||
}
|
||||
@@ -148,7 +148,7 @@ public class RangeTest {
|
||||
assertTrue(1.toByte() in range)
|
||||
assertTrue(1.toShort() in range)
|
||||
assertTrue(1.toInt() in range)
|
||||
run @Suppress("DEPRECATION") {
|
||||
run @Suppress("DEPRECATION_ERROR") {
|
||||
assertTrue(1.toFloat() in range)
|
||||
assertTrue(1.toDouble() in range)
|
||||
|
||||
@@ -218,7 +218,7 @@ public class RangeTest {
|
||||
|
||||
assertFalse(range.isEmpty())
|
||||
|
||||
run @Suppress("DEPRECATION") {
|
||||
run @Suppress("DEPRECATION_ERROR") {
|
||||
assertTrue(1.toByte() in range)
|
||||
assertTrue(1.toShort() in range)
|
||||
assertTrue(1.toInt() in range)
|
||||
@@ -266,7 +266,7 @@ public class RangeTest {
|
||||
|
||||
assertFalse(range.isEmpty())
|
||||
|
||||
run @Suppress("DEPRECATION") {
|
||||
run @Suppress("DEPRECATION_ERROR") {
|
||||
assertTrue(1.toByte() in range)
|
||||
assertTrue(1.toShort() in range)
|
||||
assertTrue(1.toInt() in range)
|
||||
|
||||
Reference in New Issue
Block a user