KT-53778 Remove experimental annotations from open ranges
This commit is contained in:
committed by
Space Team
parent
9953991c4c
commit
b35b727d73
@@ -242,8 +242,8 @@ public value class UByte @kotlin.internal.IntrinsicConstEvaluation @PublishedApi
|
||||
*
|
||||
* If the [other] value is less than or equal to `this` value, then the returned range is empty.
|
||||
*/
|
||||
@SinceKotlin("1.7")
|
||||
@ExperimentalStdlibApi
|
||||
@SinceKotlin("1.9")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun rangeUntil(other: UByte): UIntRange = this.toUInt() until other.toUInt()
|
||||
|
||||
|
||||
@@ -242,8 +242,8 @@ public value class UInt @kotlin.internal.IntrinsicConstEvaluation @PublishedApi
|
||||
*
|
||||
* If the [other] value is less than or equal to `this` value, then the returned range is empty.
|
||||
*/
|
||||
@SinceKotlin("1.7")
|
||||
@ExperimentalStdlibApi
|
||||
@SinceKotlin("1.9")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun rangeUntil(other: UInt): UIntRange = this until other
|
||||
|
||||
|
||||
@@ -16,14 +16,13 @@ import kotlin.internal.*
|
||||
*/
|
||||
@SinceKotlin("1.5")
|
||||
@WasExperimental(ExperimentalUnsignedTypes::class)
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
public class UIntRange(start: UInt, endInclusive: UInt) : UIntProgression(start, endInclusive, 1), ClosedRange<UInt>, OpenEndRange<UInt> {
|
||||
override val start: UInt get() = first
|
||||
override val endInclusive: UInt get() = last
|
||||
|
||||
@SinceKotlin("1.7")
|
||||
@ExperimentalStdlibApi
|
||||
@Deprecated("Can throw an exception when it's impossible to represent the value with UInt type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.")
|
||||
@SinceKotlin("1.9")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
override val endExclusive: UInt get() {
|
||||
if (last == UInt.MAX_VALUE) error("Cannot return the exclusive upper bound of a range that includes MAX_VALUE.")
|
||||
return last + 1u
|
||||
|
||||
@@ -242,8 +242,8 @@ public value class ULong @kotlin.internal.IntrinsicConstEvaluation @PublishedApi
|
||||
*
|
||||
* If the [other] value is less than or equal to `this` value, then the returned range is empty.
|
||||
*/
|
||||
@SinceKotlin("1.7")
|
||||
@ExperimentalStdlibApi
|
||||
@SinceKotlin("1.9")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun rangeUntil(other: ULong): ULongRange = this until other
|
||||
|
||||
|
||||
@@ -16,14 +16,13 @@ import kotlin.internal.*
|
||||
*/
|
||||
@SinceKotlin("1.5")
|
||||
@WasExperimental(ExperimentalUnsignedTypes::class)
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
public class ULongRange(start: ULong, endInclusive: ULong) : ULongProgression(start, endInclusive, 1), ClosedRange<ULong>, OpenEndRange<ULong> {
|
||||
override val start: ULong get() = first
|
||||
override val endInclusive: ULong get() = last
|
||||
|
||||
@SinceKotlin("1.7")
|
||||
@ExperimentalStdlibApi
|
||||
@Deprecated("Can throw an exception when it's impossible to represent the value with ULong type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.")
|
||||
@SinceKotlin("1.9")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
override val endExclusive: ULong get() {
|
||||
if (last == ULong.MAX_VALUE) error("Cannot return the exclusive upper bound of a range that includes MAX_VALUE.")
|
||||
return last + 1u
|
||||
|
||||
@@ -242,8 +242,8 @@ public value class UShort @kotlin.internal.IntrinsicConstEvaluation @PublishedAp
|
||||
*
|
||||
* If the [other] value is less than or equal to `this` value, then the returned range is empty.
|
||||
*/
|
||||
@SinceKotlin("1.7")
|
||||
@ExperimentalStdlibApi
|
||||
@SinceKotlin("1.9")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun rangeUntil(other: UShort): UIntRange = this.toUInt() until other.toUInt()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user