From b35b727d7307e74c9e4b54870a74f8eccab158e5 Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Tue, 11 Apr 2023 18:42:07 +0200 Subject: [PATCH] KT-53778 Remove experimental annotations from open ranges --- .../memberScopeByFqName/Int.pretty.txt | 16 +-- .../scopeProvider/memberScopeByFqName/Int.txt | 16 +-- .../testData/builtIns/kotlin-ranges.txt | 8 +- .../testData/builtIns/kotlin.txt | 34 +++--- .../builtin-classes/default/kotlin-ranges.txt | 8 +- .../builtin-classes/default/kotlin.txt | 34 +++--- .../builtin-classes/java6/kotlin-ranges.txt | 8 +- .../testData/builtin-classes/java6/kotlin.txt | 34 +++--- .../builtin-classes/java8/kotlin-ranges.txt | 8 +- .../testData/builtin-classes/java8/kotlin.txt | 34 +++--- .../newMethods/kotlin-ranges.txt | 8 +- .../builtin-classes/newMethods/kotlin.txt | 34 +++--- .../overridingXx.out | 3 - .../operatorsOverloading/until/simple.kt | 2 +- .../constFromBuiltins.__kotlin.Int.ir.txt | 16 +-- core/builtins/native/kotlin/Char.kt | 4 +- core/builtins/native/kotlin/Primitives.kt | 64 +++++------ .../primitives/BasePrimitivesGenerator.kt | 2 +- generators/builtins/ranges.kt | 20 +--- generators/builtins/unsignedTypes.kt | 11 +- .../runtime/src/main/kotlin/kotlin/Char.kt | 4 +- .../src/main/kotlin/kotlin/Primitives.kt | 64 +++++------ libraries/stdlib/api/js-v1/kotlin.kt | 84 +++++++------- libraries/stdlib/api/js-v1/kotlin.ranges.kt | 108 +++++++++--------- libraries/stdlib/api/js/kotlin.kt | 84 +++++++------- libraries/stdlib/api/js/kotlin.ranges.kt | 92 +++++++-------- .../stdlib/common/src/generated/_Ranges.kt | 52 ++++----- libraries/stdlib/js-ir/builtins/Char.kt | 4 +- libraries/stdlib/js-ir/builtins/Primitives.kt | 48 ++++---- libraries/stdlib/js-ir/runtime/long.kt | 16 +-- .../src/kotlin/ranges/PrimitiveRanges.kt | 15 +-- libraries/stdlib/src/kotlin/ranges/Range.kt | 4 +- libraries/stdlib/src/kotlin/ranges/Ranges.kt | 19 ++- libraries/stdlib/unsigned/src/kotlin/UByte.kt | 4 +- libraries/stdlib/unsigned/src/kotlin/UInt.kt | 4 +- .../stdlib/unsigned/src/kotlin/UIntRange.kt | 5 +- libraries/stdlib/unsigned/src/kotlin/ULong.kt | 4 +- .../stdlib/unsigned/src/kotlin/ULongRange.kt | 5 +- .../stdlib/unsigned/src/kotlin/UShort.kt | 4 +- libraries/stdlib/wasm/builtins/kotlin/Char.kt | 4 +- .../stdlib/wasm/builtins/kotlin/Primitives.kt | 64 +++++------ .../kotlin-stdlib-gen/src/templates/Ranges.kt | 4 +- 42 files changed, 516 insertions(+), 540 deletions(-) diff --git a/analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/Int.pretty.txt b/analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/Int.pretty.txt index 3707ae1b994..f2b7a5a19b8 100644 --- a/analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/Int.pretty.txt +++ b/analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/Int.pretty.txt @@ -94,20 +94,20 @@ operator fun rangeTo(other: kotlin.Long): kotlin.ranges.LongRange operator fun rangeTo(other: kotlin.Short): kotlin.ranges.IntRange -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = [UNRESOLVED_CLASS::class]) operator fun rangeUntil(other: kotlin.Byte): kotlin.ranges.IntRange -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = [UNRESOLVED_CLASS::class]) operator fun rangeUntil(other: kotlin.Int): kotlin.ranges.IntRange -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = [UNRESOLVED_CLASS::class]) operator fun rangeUntil(other: kotlin.Long): kotlin.ranges.LongRange -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = [UNRESOLVED_CLASS::class]) operator fun rangeUntil(other: kotlin.Short): kotlin.ranges.IntRange @kotlin.SinceKotlin(version = "1.1") diff --git a/analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/Int.txt b/analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/Int.txt index 3ff5ba86b61..f05c52592ed 100644 --- a/analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/Int.txt +++ b/analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/Int.txt @@ -1953,9 +1953,9 @@ KtFunctionSymbol: KtFunctionSymbol: annotationsList: [ - kotlin/SinceKotlin(version = "1.7") + kotlin/SinceKotlin(version = "1.9") psi: null - kotlin/ExperimentalStdlibApi() + kotlin/WasExperimental(markerClass = [UNRESOLVED_CLASS::class]) psi: null ] callableIdIfNonLocal: kotlin/Int.rangeUntil @@ -2015,9 +2015,9 @@ KtFunctionSymbol: KtFunctionSymbol: annotationsList: [ - kotlin/SinceKotlin(version = "1.7") + kotlin/SinceKotlin(version = "1.9") psi: null - kotlin/ExperimentalStdlibApi() + kotlin/WasExperimental(markerClass = [UNRESOLVED_CLASS::class]) psi: null ] callableIdIfNonLocal: kotlin/Int.rangeUntil @@ -2077,9 +2077,9 @@ KtFunctionSymbol: KtFunctionSymbol: annotationsList: [ - kotlin/SinceKotlin(version = "1.7") + kotlin/SinceKotlin(version = "1.9") psi: null - kotlin/ExperimentalStdlibApi() + kotlin/WasExperimental(markerClass = [UNRESOLVED_CLASS::class]) psi: null ] callableIdIfNonLocal: kotlin/Int.rangeUntil @@ -2139,9 +2139,9 @@ KtFunctionSymbol: KtFunctionSymbol: annotationsList: [ - kotlin/SinceKotlin(version = "1.7") + kotlin/SinceKotlin(version = "1.9") psi: null - kotlin/ExperimentalStdlibApi() + kotlin/WasExperimental(markerClass = [UNRESOLVED_CLASS::class]) psi: null ] callableIdIfNonLocal: kotlin/Int.rangeUntil diff --git a/compiler/fir/analysis-tests/testData/builtIns/kotlin-ranges.txt b/compiler/fir/analysis-tests/testData/builtIns/kotlin-ranges.txt index 80341cc1e96..50a5147e2d6 100644 --- a/compiler/fir/analysis-tests/testData/builtIns/kotlin-ranges.txt +++ b/compiler/fir/analysis-tests/testData/builtIns/kotlin-ranges.txt @@ -63,7 +63,7 @@ public final class CharRange : R|kotlin/ranges/CharProgression|, R|kotlin/ranges public open fun toString(): R|kotlin/String| - @PROPERTY:R|kotlin/Deprecated|(message = String(Can throw an exception when it's impossible to represent the value with Char type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.)) @PROPERTY:R|kotlin/SinceKotlin|(version = String(1.7)) @PROPERTY:R|kotlin/ExperimentalStdlibApi|() public open val endExclusive: R|kotlin/Char| + @PROPERTY:R|kotlin/Deprecated|(message = String(Can throw an exception when it's impossible to represent the value with Char type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.)) @PROPERTY:R|kotlin/SinceKotlin|(version = String(1.9)) @PROPERTY:R|kotlin/WasExperimental|(markerClass = (((R|kotlin/ExperimentalStdlibApi|)))) public open val endExclusive: R|kotlin/Char| public get(): R|kotlin/Char| public open val endInclusive: R|kotlin/Char| @@ -162,7 +162,7 @@ public final class IntRange : R|kotlin/ranges/IntProgression|, R|kotlin/ranges/C public open fun toString(): R|kotlin/String| - @PROPERTY:R|kotlin/Deprecated|(message = String(Can throw an exception when it's impossible to represent the value with Int type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.)) @PROPERTY:R|kotlin/SinceKotlin|(version = String(1.7)) @PROPERTY:R|kotlin/ExperimentalStdlibApi|() public open val endExclusive: R|kotlin/Int| + @PROPERTY:R|kotlin/Deprecated|(message = String(Can throw an exception when it's impossible to represent the value with Int type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.)) @PROPERTY:R|kotlin/SinceKotlin|(version = String(1.9)) @PROPERTY:R|kotlin/WasExperimental|(markerClass = (((R|kotlin/ExperimentalStdlibApi|)))) public open val endExclusive: R|kotlin/Int| public get(): R|kotlin/Int| public open val endInclusive: R|kotlin/Int| @@ -248,7 +248,7 @@ public final class LongRange : R|kotlin/ranges/LongProgression|, R|kotlin/ranges public open fun toString(): R|kotlin/String| - @PROPERTY:R|kotlin/Deprecated|(message = String(Can throw an exception when it's impossible to represent the value with Long type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.)) @PROPERTY:R|kotlin/SinceKotlin|(version = String(1.7)) @PROPERTY:R|kotlin/ExperimentalStdlibApi|() public open val endExclusive: R|kotlin/Long| + @PROPERTY:R|kotlin/Deprecated|(message = String(Can throw an exception when it's impossible to represent the value with Long type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.)) @PROPERTY:R|kotlin/SinceKotlin|(version = String(1.9)) @PROPERTY:R|kotlin/WasExperimental|(markerClass = (((R|kotlin/ExperimentalStdlibApi|)))) public open val endExclusive: R|kotlin/Long| public get(): R|kotlin/Long| public open val endInclusive: R|kotlin/Long| @@ -269,7 +269,7 @@ public final class LongRange : R|kotlin/ranges/LongProgression|, R|kotlin/ranges } -@R|kotlin/SinceKotlin|(version = String(1.7)) @R|kotlin/ExperimentalStdlibApi|() public abstract interface OpenEndRange|> : R|kotlin/Any| { +@R|kotlin/SinceKotlin|(version = String(1.9)) @R|kotlin/WasExperimental|(markerClass = (((R|kotlin/ExperimentalStdlibApi|)))) public abstract interface OpenEndRange|> : R|kotlin/Any| { public open operator fun contains(value: R|T|): R|kotlin/Boolean| public open fun isEmpty(): R|kotlin/Boolean| diff --git a/compiler/fir/analysis-tests/testData/builtIns/kotlin.txt b/compiler/fir/analysis-tests/testData/builtIns/kotlin.txt index f03fe7d998f..d9010c57a45 100644 --- a/compiler/fir/analysis-tests/testData/builtIns/kotlin.txt +++ b/compiler/fir/analysis-tests/testData/builtIns/kotlin.txt @@ -163,13 +163,13 @@ public final class Byte : R|kotlin/Number|, R|kotlin/Comparable|, R public final operator fun rangeTo(other: R|kotlin/Short|): R|kotlin/ranges/IntRange| - @R|kotlin/SinceKotlin|(version = String(1.7)) @R|kotlin/ExperimentalStdlibApi|() public final operator fun rangeUntil(other: R|kotlin/Byte|): R|kotlin/ranges/IntRange| + @R|kotlin/SinceKotlin|(version = String(1.9)) @R|kotlin/WasExperimental|(markerClass = (((R|kotlin/ExperimentalStdlibApi|)))) public final operator fun rangeUntil(other: R|kotlin/Byte|): R|kotlin/ranges/IntRange| - @R|kotlin/SinceKotlin|(version = String(1.7)) @R|kotlin/ExperimentalStdlibApi|() public final operator fun rangeUntil(other: R|kotlin/Int|): R|kotlin/ranges/IntRange| + @R|kotlin/SinceKotlin|(version = String(1.9)) @R|kotlin/WasExperimental|(markerClass = (((R|kotlin/ExperimentalStdlibApi|)))) public final operator fun rangeUntil(other: R|kotlin/Int|): R|kotlin/ranges/IntRange| - @R|kotlin/SinceKotlin|(version = String(1.7)) @R|kotlin/ExperimentalStdlibApi|() public final operator fun rangeUntil(other: R|kotlin/Long|): R|kotlin/ranges/LongRange| + @R|kotlin/SinceKotlin|(version = String(1.9)) @R|kotlin/WasExperimental|(markerClass = (((R|kotlin/ExperimentalStdlibApi|)))) public final operator fun rangeUntil(other: R|kotlin/Long|): R|kotlin/ranges/LongRange| - @R|kotlin/SinceKotlin|(version = String(1.7)) @R|kotlin/ExperimentalStdlibApi|() public final operator fun rangeUntil(other: R|kotlin/Short|): R|kotlin/ranges/IntRange| + @R|kotlin/SinceKotlin|(version = String(1.9)) @R|kotlin/WasExperimental|(markerClass = (((R|kotlin/ExperimentalStdlibApi|)))) public final operator fun rangeUntil(other: R|kotlin/Short|): R|kotlin/ranges/IntRange| @R|kotlin/SinceKotlin|(version = String(1.1)) @R|kotlin/internal/IntrinsicConstEvaluation|() public final operator fun rem(other: R|kotlin/Byte|): R|kotlin/Int| @@ -271,7 +271,7 @@ public final class Char : R|kotlin/Comparable|, R|java/io/Serializa public final operator fun rangeTo(other: R|kotlin/Char|): R|kotlin/ranges/CharRange| - @R|kotlin/SinceKotlin|(version = String(1.7)) @R|kotlin/ExperimentalStdlibApi|() public final operator fun rangeUntil(other: R|kotlin/Char|): R|kotlin/ranges/CharRange| + @R|kotlin/SinceKotlin|(version = String(1.9)) @R|kotlin/WasExperimental|(markerClass = (((R|kotlin/ExperimentalStdlibApi|)))) public final operator fun rangeUntil(other: R|kotlin/Char|): R|kotlin/ranges/CharRange| @R|kotlin/Deprecated|(message = String(Conversion of Char to Number is deprecated. Use Char.code property instead.), replaceWith = @R|kotlin/ReplaceWith|(imports = (), expression = String(this.code.toByte())) ) @R|kotlin/DeprecatedSinceKotlin|(warningSince = String(1.5)) @R|kotlin/internal/IntrinsicConstEvaluation|() public final fun toByte(): R|kotlin/Byte| @@ -826,13 +826,13 @@ public final class Int : R|kotlin/Number|, R|kotlin/Comparable|, R|j public final operator fun rangeTo(other: R|kotlin/Short|): R|kotlin/ranges/IntRange| - @R|kotlin/SinceKotlin|(version = String(1.7)) @R|kotlin/ExperimentalStdlibApi|() public final operator fun rangeUntil(other: R|kotlin/Byte|): R|kotlin/ranges/IntRange| + @R|kotlin/SinceKotlin|(version = String(1.9)) @R|kotlin/WasExperimental|(markerClass = (((R|kotlin/ExperimentalStdlibApi|)))) public final operator fun rangeUntil(other: R|kotlin/Byte|): R|kotlin/ranges/IntRange| - @R|kotlin/SinceKotlin|(version = String(1.7)) @R|kotlin/ExperimentalStdlibApi|() public final operator fun rangeUntil(other: R|kotlin/Int|): R|kotlin/ranges/IntRange| + @R|kotlin/SinceKotlin|(version = String(1.9)) @R|kotlin/WasExperimental|(markerClass = (((R|kotlin/ExperimentalStdlibApi|)))) public final operator fun rangeUntil(other: R|kotlin/Int|): R|kotlin/ranges/IntRange| - @R|kotlin/SinceKotlin|(version = String(1.7)) @R|kotlin/ExperimentalStdlibApi|() public final operator fun rangeUntil(other: R|kotlin/Long|): R|kotlin/ranges/LongRange| + @R|kotlin/SinceKotlin|(version = String(1.9)) @R|kotlin/WasExperimental|(markerClass = (((R|kotlin/ExperimentalStdlibApi|)))) public final operator fun rangeUntil(other: R|kotlin/Long|): R|kotlin/ranges/LongRange| - @R|kotlin/SinceKotlin|(version = String(1.7)) @R|kotlin/ExperimentalStdlibApi|() public final operator fun rangeUntil(other: R|kotlin/Short|): R|kotlin/ranges/IntRange| + @R|kotlin/SinceKotlin|(version = String(1.9)) @R|kotlin/WasExperimental|(markerClass = (((R|kotlin/ExperimentalStdlibApi|)))) public final operator fun rangeUntil(other: R|kotlin/Short|): R|kotlin/ranges/IntRange| @R|kotlin/SinceKotlin|(version = String(1.1)) @R|kotlin/internal/IntrinsicConstEvaluation|() public final operator fun rem(other: R|kotlin/Byte|): R|kotlin/Int| @@ -994,13 +994,13 @@ public final class Long : R|kotlin/Number|, R|kotlin/Comparable|, R public final operator fun rangeTo(other: R|kotlin/Short|): R|kotlin/ranges/LongRange| - @R|kotlin/SinceKotlin|(version = String(1.7)) @R|kotlin/ExperimentalStdlibApi|() public final operator fun rangeUntil(other: R|kotlin/Byte|): R|kotlin/ranges/LongRange| + @R|kotlin/SinceKotlin|(version = String(1.9)) @R|kotlin/WasExperimental|(markerClass = (((R|kotlin/ExperimentalStdlibApi|)))) public final operator fun rangeUntil(other: R|kotlin/Byte|): R|kotlin/ranges/LongRange| - @R|kotlin/SinceKotlin|(version = String(1.7)) @R|kotlin/ExperimentalStdlibApi|() public final operator fun rangeUntil(other: R|kotlin/Int|): R|kotlin/ranges/LongRange| + @R|kotlin/SinceKotlin|(version = String(1.9)) @R|kotlin/WasExperimental|(markerClass = (((R|kotlin/ExperimentalStdlibApi|)))) public final operator fun rangeUntil(other: R|kotlin/Int|): R|kotlin/ranges/LongRange| - @R|kotlin/SinceKotlin|(version = String(1.7)) @R|kotlin/ExperimentalStdlibApi|() public final operator fun rangeUntil(other: R|kotlin/Long|): R|kotlin/ranges/LongRange| + @R|kotlin/SinceKotlin|(version = String(1.9)) @R|kotlin/WasExperimental|(markerClass = (((R|kotlin/ExperimentalStdlibApi|)))) public final operator fun rangeUntil(other: R|kotlin/Long|): R|kotlin/ranges/LongRange| - @R|kotlin/SinceKotlin|(version = String(1.7)) @R|kotlin/ExperimentalStdlibApi|() public final operator fun rangeUntil(other: R|kotlin/Short|): R|kotlin/ranges/LongRange| + @R|kotlin/SinceKotlin|(version = String(1.9)) @R|kotlin/WasExperimental|(markerClass = (((R|kotlin/ExperimentalStdlibApi|)))) public final operator fun rangeUntil(other: R|kotlin/Short|): R|kotlin/ranges/LongRange| @R|kotlin/SinceKotlin|(version = String(1.1)) @R|kotlin/internal/IntrinsicConstEvaluation|() public final operator fun rem(other: R|kotlin/Byte|): R|kotlin/Long| @@ -1241,13 +1241,13 @@ public final class Short : R|kotlin/Number|, R|kotlin/Comparable|, public final operator fun rangeTo(other: R|kotlin/Short|): R|kotlin/ranges/IntRange| - @R|kotlin/SinceKotlin|(version = String(1.7)) @R|kotlin/ExperimentalStdlibApi|() public final operator fun rangeUntil(other: R|kotlin/Byte|): R|kotlin/ranges/IntRange| + @R|kotlin/SinceKotlin|(version = String(1.9)) @R|kotlin/WasExperimental|(markerClass = (((R|kotlin/ExperimentalStdlibApi|)))) public final operator fun rangeUntil(other: R|kotlin/Byte|): R|kotlin/ranges/IntRange| - @R|kotlin/SinceKotlin|(version = String(1.7)) @R|kotlin/ExperimentalStdlibApi|() public final operator fun rangeUntil(other: R|kotlin/Int|): R|kotlin/ranges/IntRange| + @R|kotlin/SinceKotlin|(version = String(1.9)) @R|kotlin/WasExperimental|(markerClass = (((R|kotlin/ExperimentalStdlibApi|)))) public final operator fun rangeUntil(other: R|kotlin/Int|): R|kotlin/ranges/IntRange| - @R|kotlin/SinceKotlin|(version = String(1.7)) @R|kotlin/ExperimentalStdlibApi|() public final operator fun rangeUntil(other: R|kotlin/Long|): R|kotlin/ranges/LongRange| + @R|kotlin/SinceKotlin|(version = String(1.9)) @R|kotlin/WasExperimental|(markerClass = (((R|kotlin/ExperimentalStdlibApi|)))) public final operator fun rangeUntil(other: R|kotlin/Long|): R|kotlin/ranges/LongRange| - @R|kotlin/SinceKotlin|(version = String(1.7)) @R|kotlin/ExperimentalStdlibApi|() public final operator fun rangeUntil(other: R|kotlin/Short|): R|kotlin/ranges/IntRange| + @R|kotlin/SinceKotlin|(version = String(1.9)) @R|kotlin/WasExperimental|(markerClass = (((R|kotlin/ExperimentalStdlibApi|)))) public final operator fun rangeUntil(other: R|kotlin/Short|): R|kotlin/ranges/IntRange| @R|kotlin/SinceKotlin|(version = String(1.1)) @R|kotlin/internal/IntrinsicConstEvaluation|() public final operator fun rem(other: R|kotlin/Byte|): R|kotlin/Int| diff --git a/compiler/testData/builtin-classes/default/kotlin-ranges.txt b/compiler/testData/builtin-classes/default/kotlin-ranges.txt index 7059b6de5fa..a2f57b48e0f 100644 --- a/compiler/testData/builtin-classes/default/kotlin-ranges.txt +++ b/compiler/testData/builtin-classes/default/kotlin-ranges.txt @@ -36,7 +36,7 @@ internal final class CharProgressionIterator : kotlin.collections.CharIterator { public final class CharRange : kotlin.ranges.CharProgression, kotlin.ranges.ClosedRange, kotlin.ranges.OpenEndRange { /*primary*/ public constructor CharRange(/*0*/ start: kotlin.Char, /*1*/ endInclusive: kotlin.Char) - @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Char type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") @kotlin.SinceKotlin(version = "1.7") public open override /*1*/ val endExclusive: kotlin.Char + @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Char type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public open override /*1*/ val endExclusive: kotlin.Char public open override /*1*/ fun ``(): kotlin.Char public open override /*1*/ val endInclusive: kotlin.Char public open override /*1*/ fun ``(): kotlin.Char @@ -104,7 +104,7 @@ internal final class IntProgressionIterator : kotlin.collections.IntIterator { public final class IntRange : kotlin.ranges.IntProgression, kotlin.ranges.ClosedRange, kotlin.ranges.OpenEndRange { /*primary*/ public constructor IntRange(/*0*/ start: kotlin.Int, /*1*/ endInclusive: kotlin.Int) - @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Int type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") @kotlin.SinceKotlin(version = "1.7") public open override /*1*/ val endExclusive: kotlin.Int + @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Int type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public open override /*1*/ val endExclusive: kotlin.Int public open override /*1*/ fun ``(): kotlin.Int public open override /*1*/ val endInclusive: kotlin.Int public open override /*1*/ fun ``(): kotlin.Int @@ -163,7 +163,7 @@ internal final class LongProgressionIterator : kotlin.collections.LongIterator { public final class LongRange : kotlin.ranges.LongProgression, kotlin.ranges.ClosedRange, kotlin.ranges.OpenEndRange { /*primary*/ public constructor LongRange(/*0*/ start: kotlin.Long, /*1*/ endInclusive: kotlin.Long) - @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Long type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") @kotlin.SinceKotlin(version = "1.7") public open override /*1*/ val endExclusive: kotlin.Long + @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Long type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public open override /*1*/ val endExclusive: kotlin.Long public open override /*1*/ fun ``(): kotlin.Long public open override /*1*/ val endInclusive: kotlin.Long public open override /*1*/ fun ``(): kotlin.Long @@ -186,7 +186,7 @@ public final class LongRange : kotlin.ranges.LongProgression, kotlin.ranges.Clos } } -@kotlin.SinceKotlin(version = "1.7") public interface OpenEndRange> { +@kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public interface OpenEndRange> { public abstract val endExclusive: T public abstract fun ``(): T public abstract val start: T diff --git a/compiler/testData/builtin-classes/default/kotlin.txt b/compiler/testData/builtin-classes/default/kotlin.txt index 30e461e7c4d..0a1080b538d 100644 --- a/compiler/testData/builtin-classes/default/kotlin.txt +++ b/compiler/testData/builtin-classes/default/kotlin.txt @@ -87,10 +87,10 @@ public final class Byte : kotlin.Number, kotlin.Comparable { public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Int @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float @@ -145,7 +145,7 @@ public final class Char : kotlin.Comparable { @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Char @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(/*0*/ other: kotlin.Int): kotlin.Char public final operator fun rangeTo(/*0*/ other: kotlin.Char): kotlin.ranges.CharRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Char): kotlin.ranges.CharRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Char): kotlin.ranges.CharRange @kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code.toByte()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") @kotlin.internal.IntrinsicConstEvaluation public final fun toByte(): kotlin.Byte @kotlin.internal.IntrinsicConstEvaluation public final fun toChar(): kotlin.Char @kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code.toDouble()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") @kotlin.internal.IntrinsicConstEvaluation public final fun toDouble(): kotlin.Double @@ -472,10 +472,10 @@ public final class Int : kotlin.Number, kotlin.Comparable { public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Int @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float @@ -560,10 +560,10 @@ public final class Long : kotlin.Number, kotlin.Comparable { public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.LongRange @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Long @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float @@ -712,10 +712,10 @@ public final class Short : kotlin.Number, kotlin.Comparable { public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Int @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float diff --git a/compiler/testData/builtin-classes/java6/kotlin-ranges.txt b/compiler/testData/builtin-classes/java6/kotlin-ranges.txt index 7059b6de5fa..a2f57b48e0f 100644 --- a/compiler/testData/builtin-classes/java6/kotlin-ranges.txt +++ b/compiler/testData/builtin-classes/java6/kotlin-ranges.txt @@ -36,7 +36,7 @@ internal final class CharProgressionIterator : kotlin.collections.CharIterator { public final class CharRange : kotlin.ranges.CharProgression, kotlin.ranges.ClosedRange, kotlin.ranges.OpenEndRange { /*primary*/ public constructor CharRange(/*0*/ start: kotlin.Char, /*1*/ endInclusive: kotlin.Char) - @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Char type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") @kotlin.SinceKotlin(version = "1.7") public open override /*1*/ val endExclusive: kotlin.Char + @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Char type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public open override /*1*/ val endExclusive: kotlin.Char public open override /*1*/ fun ``(): kotlin.Char public open override /*1*/ val endInclusive: kotlin.Char public open override /*1*/ fun ``(): kotlin.Char @@ -104,7 +104,7 @@ internal final class IntProgressionIterator : kotlin.collections.IntIterator { public final class IntRange : kotlin.ranges.IntProgression, kotlin.ranges.ClosedRange, kotlin.ranges.OpenEndRange { /*primary*/ public constructor IntRange(/*0*/ start: kotlin.Int, /*1*/ endInclusive: kotlin.Int) - @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Int type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") @kotlin.SinceKotlin(version = "1.7") public open override /*1*/ val endExclusive: kotlin.Int + @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Int type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public open override /*1*/ val endExclusive: kotlin.Int public open override /*1*/ fun ``(): kotlin.Int public open override /*1*/ val endInclusive: kotlin.Int public open override /*1*/ fun ``(): kotlin.Int @@ -163,7 +163,7 @@ internal final class LongProgressionIterator : kotlin.collections.LongIterator { public final class LongRange : kotlin.ranges.LongProgression, kotlin.ranges.ClosedRange, kotlin.ranges.OpenEndRange { /*primary*/ public constructor LongRange(/*0*/ start: kotlin.Long, /*1*/ endInclusive: kotlin.Long) - @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Long type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") @kotlin.SinceKotlin(version = "1.7") public open override /*1*/ val endExclusive: kotlin.Long + @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Long type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public open override /*1*/ val endExclusive: kotlin.Long public open override /*1*/ fun ``(): kotlin.Long public open override /*1*/ val endInclusive: kotlin.Long public open override /*1*/ fun ``(): kotlin.Long @@ -186,7 +186,7 @@ public final class LongRange : kotlin.ranges.LongProgression, kotlin.ranges.Clos } } -@kotlin.SinceKotlin(version = "1.7") public interface OpenEndRange> { +@kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public interface OpenEndRange> { public abstract val endExclusive: T public abstract fun ``(): T public abstract val start: T diff --git a/compiler/testData/builtin-classes/java6/kotlin.txt b/compiler/testData/builtin-classes/java6/kotlin.txt index 7716accf057..302ba5bb550 100644 --- a/compiler/testData/builtin-classes/java6/kotlin.txt +++ b/compiler/testData/builtin-classes/java6/kotlin.txt @@ -89,10 +89,10 @@ public final class Byte : kotlin.Number, kotlin.Comparable, java.io public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Int @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float @@ -148,7 +148,7 @@ public final class Char : kotlin.Comparable, java.io.Serializable { @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Char @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(/*0*/ other: kotlin.Int): kotlin.Char public final operator fun rangeTo(/*0*/ other: kotlin.Char): kotlin.ranges.CharRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Char): kotlin.ranges.CharRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Char): kotlin.ranges.CharRange @kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code.toByte()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") @kotlin.internal.IntrinsicConstEvaluation public final fun toByte(): kotlin.Byte @kotlin.internal.IntrinsicConstEvaluation public final fun toChar(): kotlin.Char @kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code.toDouble()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") @kotlin.internal.IntrinsicConstEvaluation public final fun toDouble(): kotlin.Double @@ -488,10 +488,10 @@ public final class Int : kotlin.Number, kotlin.Comparable, java.io.S public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Int @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float @@ -577,10 +577,10 @@ public final class Long : kotlin.Number, kotlin.Comparable, java.io public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.LongRange @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Long @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float @@ -734,10 +734,10 @@ public final class Short : kotlin.Number, kotlin.Comparable, java. public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Int @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float diff --git a/compiler/testData/builtin-classes/java8/kotlin-ranges.txt b/compiler/testData/builtin-classes/java8/kotlin-ranges.txt index b3ed37b7ed0..cd208a25c25 100644 --- a/compiler/testData/builtin-classes/java8/kotlin-ranges.txt +++ b/compiler/testData/builtin-classes/java8/kotlin-ranges.txt @@ -39,7 +39,7 @@ internal final class CharProgressionIterator : kotlin.collections.CharIterator { public final class CharRange : kotlin.ranges.CharProgression, kotlin.ranges.ClosedRange, kotlin.ranges.OpenEndRange { /*primary*/ public constructor CharRange(/*0*/ start: kotlin.Char, /*1*/ endInclusive: kotlin.Char) - @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Char type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") @kotlin.SinceKotlin(version = "1.7") public open override /*1*/ val endExclusive: kotlin.Char + @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Char type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public open override /*1*/ val endExclusive: kotlin.Char public open override /*1*/ fun ``(): kotlin.Char public open override /*1*/ val endInclusive: kotlin.Char public open override /*1*/ fun ``(): kotlin.Char @@ -112,7 +112,7 @@ internal final class IntProgressionIterator : kotlin.collections.IntIterator { public final class IntRange : kotlin.ranges.IntProgression, kotlin.ranges.ClosedRange, kotlin.ranges.OpenEndRange { /*primary*/ public constructor IntRange(/*0*/ start: kotlin.Int, /*1*/ endInclusive: kotlin.Int) - @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Int type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") @kotlin.SinceKotlin(version = "1.7") public open override /*1*/ val endExclusive: kotlin.Int + @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Int type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public open override /*1*/ val endExclusive: kotlin.Int public open override /*1*/ fun ``(): kotlin.Int public open override /*1*/ val endInclusive: kotlin.Int public open override /*1*/ fun ``(): kotlin.Int @@ -176,7 +176,7 @@ internal final class LongProgressionIterator : kotlin.collections.LongIterator { public final class LongRange : kotlin.ranges.LongProgression, kotlin.ranges.ClosedRange, kotlin.ranges.OpenEndRange { /*primary*/ public constructor LongRange(/*0*/ start: kotlin.Long, /*1*/ endInclusive: kotlin.Long) - @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Long type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") @kotlin.SinceKotlin(version = "1.7") public open override /*1*/ val endExclusive: kotlin.Long + @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Long type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public open override /*1*/ val endExclusive: kotlin.Long public open override /*1*/ fun ``(): kotlin.Long public open override /*1*/ val endInclusive: kotlin.Long public open override /*1*/ fun ``(): kotlin.Long @@ -201,7 +201,7 @@ public final class LongRange : kotlin.ranges.LongProgression, kotlin.ranges.Clos } } -@kotlin.SinceKotlin(version = "1.7") public interface OpenEndRange> { +@kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public interface OpenEndRange> { public abstract val endExclusive: T public abstract fun ``(): T public abstract val start: T diff --git a/compiler/testData/builtin-classes/java8/kotlin.txt b/compiler/testData/builtin-classes/java8/kotlin.txt index b24f2fe5687..abdeef2b4d8 100644 --- a/compiler/testData/builtin-classes/java8/kotlin.txt +++ b/compiler/testData/builtin-classes/java8/kotlin.txt @@ -89,10 +89,10 @@ public final class Byte : kotlin.Number, kotlin.Comparable, java.io public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Int @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float @@ -148,7 +148,7 @@ public final class Char : kotlin.Comparable, java.io.Serializable { @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Char @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(/*0*/ other: kotlin.Int): kotlin.Char public final operator fun rangeTo(/*0*/ other: kotlin.Char): kotlin.ranges.CharRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Char): kotlin.ranges.CharRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Char): kotlin.ranges.CharRange @kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code.toByte()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") @kotlin.internal.IntrinsicConstEvaluation public final fun toByte(): kotlin.Byte @kotlin.internal.IntrinsicConstEvaluation public final fun toChar(): kotlin.Char @kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code.toDouble()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") @kotlin.internal.IntrinsicConstEvaluation public final fun toDouble(): kotlin.Double @@ -490,10 +490,10 @@ public final class Int : kotlin.Number, kotlin.Comparable, java.io.S public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Int @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float @@ -579,10 +579,10 @@ public final class Long : kotlin.Number, kotlin.Comparable, java.io public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.LongRange @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Long @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float @@ -736,10 +736,10 @@ public final class Short : kotlin.Number, kotlin.Comparable, java. public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Int @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float diff --git a/compiler/testData/builtin-classes/newMethods/kotlin-ranges.txt b/compiler/testData/builtin-classes/newMethods/kotlin-ranges.txt index 7059b6de5fa..a2f57b48e0f 100644 --- a/compiler/testData/builtin-classes/newMethods/kotlin-ranges.txt +++ b/compiler/testData/builtin-classes/newMethods/kotlin-ranges.txt @@ -36,7 +36,7 @@ internal final class CharProgressionIterator : kotlin.collections.CharIterator { public final class CharRange : kotlin.ranges.CharProgression, kotlin.ranges.ClosedRange, kotlin.ranges.OpenEndRange { /*primary*/ public constructor CharRange(/*0*/ start: kotlin.Char, /*1*/ endInclusive: kotlin.Char) - @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Char type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") @kotlin.SinceKotlin(version = "1.7") public open override /*1*/ val endExclusive: kotlin.Char + @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Char type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public open override /*1*/ val endExclusive: kotlin.Char public open override /*1*/ fun ``(): kotlin.Char public open override /*1*/ val endInclusive: kotlin.Char public open override /*1*/ fun ``(): kotlin.Char @@ -104,7 +104,7 @@ internal final class IntProgressionIterator : kotlin.collections.IntIterator { public final class IntRange : kotlin.ranges.IntProgression, kotlin.ranges.ClosedRange, kotlin.ranges.OpenEndRange { /*primary*/ public constructor IntRange(/*0*/ start: kotlin.Int, /*1*/ endInclusive: kotlin.Int) - @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Int type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") @kotlin.SinceKotlin(version = "1.7") public open override /*1*/ val endExclusive: kotlin.Int + @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Int type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public open override /*1*/ val endExclusive: kotlin.Int public open override /*1*/ fun ``(): kotlin.Int public open override /*1*/ val endInclusive: kotlin.Int public open override /*1*/ fun ``(): kotlin.Int @@ -163,7 +163,7 @@ internal final class LongProgressionIterator : kotlin.collections.LongIterator { public final class LongRange : kotlin.ranges.LongProgression, kotlin.ranges.ClosedRange, kotlin.ranges.OpenEndRange { /*primary*/ public constructor LongRange(/*0*/ start: kotlin.Long, /*1*/ endInclusive: kotlin.Long) - @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Long type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") @kotlin.SinceKotlin(version = "1.7") public open override /*1*/ val endExclusive: kotlin.Long + @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Long type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public open override /*1*/ val endExclusive: kotlin.Long public open override /*1*/ fun ``(): kotlin.Long public open override /*1*/ val endInclusive: kotlin.Long public open override /*1*/ fun ``(): kotlin.Long @@ -186,7 +186,7 @@ public final class LongRange : kotlin.ranges.LongProgression, kotlin.ranges.Clos } } -@kotlin.SinceKotlin(version = "1.7") public interface OpenEndRange> { +@kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public interface OpenEndRange> { public abstract val endExclusive: T public abstract fun ``(): T public abstract val start: T diff --git a/compiler/testData/builtin-classes/newMethods/kotlin.txt b/compiler/testData/builtin-classes/newMethods/kotlin.txt index cb66b14f67a..de4a30e28fa 100644 --- a/compiler/testData/builtin-classes/newMethods/kotlin.txt +++ b/compiler/testData/builtin-classes/newMethods/kotlin.txt @@ -89,10 +89,10 @@ public final class Byte : kotlin.Number, kotlin.Comparable, java.io public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Int @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float @@ -148,7 +148,7 @@ public final class Char : kotlin.Comparable, java.io.Serializable { @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Char @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(/*0*/ other: kotlin.Int): kotlin.Char public final operator fun rangeTo(/*0*/ other: kotlin.Char): kotlin.ranges.CharRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Char): kotlin.ranges.CharRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Char): kotlin.ranges.CharRange @kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code.toByte()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") @kotlin.internal.IntrinsicConstEvaluation public final fun toByte(): kotlin.Byte @kotlin.internal.IntrinsicConstEvaluation public final fun toChar(): kotlin.Char @kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code.toDouble()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") @kotlin.internal.IntrinsicConstEvaluation public final fun toDouble(): kotlin.Double @@ -488,10 +488,10 @@ public final class Int : kotlin.Number, kotlin.Comparable, java.io.S public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Int @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float @@ -577,10 +577,10 @@ public final class Long : kotlin.Number, kotlin.Comparable, java.io public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.LongRange @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Long @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float @@ -734,10 +734,10 @@ public final class Short : kotlin.Number, kotlin.Comparable, java. public final operator fun rangeTo(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange public final operator fun rangeTo(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange public final operator fun rangeTo(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Byte): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Int): kotlin.ranges.IntRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Long): kotlin.ranges.LongRange + @kotlin.SinceKotlin(version = "1.9") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(/*0*/ other: kotlin.Short): kotlin.ranges.IntRange @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Byte): kotlin.Int @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(/*0*/ other: kotlin.Float): kotlin.Float diff --git a/compiler/testData/cli/jvm/readingConfigFromEnvironment/overridingXx.out b/compiler/testData/cli/jvm/readingConfigFromEnvironment/overridingXx.out index 6d3b7543925..b1da308e5ce 100644 --- a/compiler/testData/cli/jvm/readingConfigFromEnvironment/overridingXx.out +++ b/compiler/testData/cli/jvm/readingConfigFromEnvironment/overridingXx.out @@ -7,9 +7,6 @@ This mode is not recommended for production use, as no stability/compatibility guarantees are given on compiler or generated code. Use it at your own risk! -compiler/testData/cli/jvm/readingConfigFromEnvironment/overridingXx.kt:3:19: error: this declaration needs opt-in. Its usage must be marked with '@kotlin.ExperimentalStdlibApi' or '@OptIn(kotlin.ExperimentalStdlibApi::class)' - for (x in 100 ..< 1) { - ^ compiler/testData/cli/jvm/readingConfigFromEnvironment/overridingXx.kt:3:19: error: the feature "range until operator" is disabled for (x in 100 ..< 1) { ^ diff --git a/compiler/testData/diagnostics/tests/operatorsOverloading/until/simple.kt b/compiler/testData/diagnostics/tests/operatorsOverloading/until/simple.kt index ff87d6b4940..b94f0a96afe 100644 --- a/compiler/testData/diagnostics/tests/operatorsOverloading/until/simple.kt +++ b/compiler/testData/diagnostics/tests/operatorsOverloading/until/simple.kt @@ -2,7 +2,7 @@ // !LANGUAGE: +RangeUntilOperator fun main(n: Int) { - for (i in 0..<n) { + for (i in 0.. ($this:kotlin.Int, other:kotlin.Byte) returnType:kotlin.ranges.IntRange [operator] annotations: - SinceKotlin(version = '1.7') - ExperimentalStdlibApi + SinceKotlin(version = '1.9') + WasExperimental(markerClass = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_DECLARATION_STUB ANNOTATION_CLASS name:ExperimentalStdlibApi modality:OPEN visibility:public superTypes:[kotlin.Annotation]' type=kotlin.reflect.KClass]) $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Byte FUN IR_EXTERNAL_DECLARATION_STUB name:rangeUntil visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Int) returnType:kotlin.ranges.IntRange [operator] annotations: - SinceKotlin(version = '1.7') - ExperimentalStdlibApi + SinceKotlin(version = '1.9') + WasExperimental(markerClass = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_DECLARATION_STUB ANNOTATION_CLASS name:ExperimentalStdlibApi modality:OPEN visibility:public superTypes:[kotlin.Annotation]' type=kotlin.reflect.KClass]) $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Int FUN IR_EXTERNAL_DECLARATION_STUB name:rangeUntil visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Long) returnType:kotlin.ranges.LongRange [operator] annotations: - SinceKotlin(version = '1.7') - ExperimentalStdlibApi + SinceKotlin(version = '1.9') + WasExperimental(markerClass = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_DECLARATION_STUB ANNOTATION_CLASS name:ExperimentalStdlibApi modality:OPEN visibility:public superTypes:[kotlin.Annotation]' type=kotlin.reflect.KClass]) $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Long FUN IR_EXTERNAL_DECLARATION_STUB name:rangeUntil visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Short) returnType:kotlin.ranges.IntRange [operator] annotations: - SinceKotlin(version = '1.7') - ExperimentalStdlibApi + SinceKotlin(version = '1.9') + WasExperimental(markerClass = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_DECLARATION_STUB ANNOTATION_CLASS name:ExperimentalStdlibApi modality:OPEN visibility:public superTypes:[kotlin.Annotation]' type=kotlin.reflect.KClass]) $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Short FUN IR_EXTERNAL_DECLARATION_STUB name:rem visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Byte) returnType:kotlin.Int [operator] diff --git a/core/builtins/native/kotlin/Char.kt b/core/builtins/native/kotlin/Char.kt index ddb6acd4a2f..15061b08e2c 100644 --- a/core/builtins/native/kotlin/Char.kt +++ b/core/builtins/native/kotlin/Char.kt @@ -53,8 +53,8 @@ public class Char private constructor() : Comparable { * * 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) public operator fun rangeUntil(other: Char): CharRange /** Returns the value of this character as a `Byte`. */ diff --git a/core/builtins/native/kotlin/Primitives.kt b/core/builtins/native/kotlin/Primitives.kt index 85740a33678..1386d1b9ecd 100644 --- a/core/builtins/native/kotlin/Primitives.kt +++ b/core/builtins/native/kotlin/Primitives.kt @@ -273,8 +273,8 @@ public class Byte private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Byte): IntRange /** @@ -282,8 +282,8 @@ public class Byte private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Short): IntRange /** @@ -291,8 +291,8 @@ public class Byte private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Int): IntRange /** @@ -300,8 +300,8 @@ public class Byte private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Long): LongRange /** Returns this value. */ @@ -643,8 +643,8 @@ public class Short private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Byte): IntRange /** @@ -652,8 +652,8 @@ public class Short private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Short): IntRange /** @@ -661,8 +661,8 @@ public class Short private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Int): IntRange /** @@ -670,8 +670,8 @@ public class Short private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Long): LongRange /** @@ -1011,8 +1011,8 @@ public class Int private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Byte): IntRange /** @@ -1020,8 +1020,8 @@ public class Int private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Short): IntRange /** @@ -1029,8 +1029,8 @@ public class Int private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Int): IntRange /** @@ -1038,8 +1038,8 @@ public class Int private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Long): LongRange /** @@ -1425,8 +1425,8 @@ public class Long private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Byte): LongRange /** @@ -1434,8 +1434,8 @@ public class Long private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Short): LongRange /** @@ -1443,8 +1443,8 @@ public class Long private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Int): LongRange /** @@ -1452,8 +1452,8 @@ public class Long private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Long): LongRange /** diff --git a/generators/builtins/primitives/BasePrimitivesGenerator.kt b/generators/builtins/primitives/BasePrimitivesGenerator.kt index 9d1b30f23f3..6d1fcd3514d 100644 --- a/generators/builtins/primitives/BasePrimitivesGenerator.kt +++ b/generators/builtins/primitives/BasePrimitivesGenerator.kt @@ -467,7 +467,7 @@ abstract class BasePrimitivesGenerator(private val writer: PrintWriter) : BuiltI If the [other] value is less than or equal to `this` value, then the returned range is empty. """.trimIndent() ) - annotations += mutableListOf("SinceKotlin(\"1.7\")", "ExperimentalStdlibApi") + annotations += mutableListOf("SinceKotlin(\"1.9\")", "WasExperimental(ExperimentalStdlibApi::class)") signature { isOperator = true methodName = "rangeUntil" diff --git a/generators/builtins/ranges.kt b/generators/builtins/ranges.kt index 1ef3d52d873..d57a7739b8e 100644 --- a/generators/builtins/ranges.kt +++ b/generators/builtins/ranges.kt @@ -1,17 +1,6 @@ /* - * Copyright 2010-2015 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.generators.builtins.ranges @@ -54,14 +43,13 @@ class GenerateRanges(out: PrintWriter) : BuiltInsSourceGenerator(out) { """/** * A range of values of type `$t`. */ -@OptIn(ExperimentalStdlibApi::class) public class $range(start: $t, endInclusive: $t) : ${t}Progression(start, endInclusive, $increment), ClosedRange<$t>, OpenEndRange<$t> { override val start: $t get() = first override val endInclusive: $t get() = last @Deprecated("Can throw an exception when it's impossible to represent the value with $t type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") - @SinceKotlin("1.7") - @ExperimentalStdlibApi + @SinceKotlin("1.9") + @WasExperimental(ExperimentalStdlibApi::class) override val endExclusive: $t get() { if (last == $t.MAX_VALUE) error("Cannot return the exclusive upper bound of a range that includes MAX_VALUE.") return last + 1 diff --git a/generators/builtins/unsignedTypes.kt b/generators/builtins/unsignedTypes.kt index c3a0b3a485c..d9f3f02206a 100644 --- a/generators/builtins/unsignedTypes.kt +++ b/generators/builtins/unsignedTypes.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ @@ -230,8 +230,8 @@ class UnsignedTypeGenerator(val type: UnsignedType, out: PrintWriter) : BuiltIns out.println(" *") out.println(" * If the [other] value is less than or equal to `this` value, then the returned range is empty.") out.println(" */") - out.println(" @SinceKotlin(\"1.7\")") - out.println(" @ExperimentalStdlibApi") + out.println(" @SinceKotlin(\"1.9\")") + out.println(" @WasExperimental(ExperimentalStdlibApi::class)") out.println(" @kotlin.internal.InlineOnly") out.println(" public inline operator fun rangeUntil(other: $className): $rangeType = ${convert("this")} until ${convert("other")}") out.println() @@ -569,14 +569,13 @@ import kotlin.internal.* */ @SinceKotlin("1.5") @WasExperimental(ExperimentalUnsignedTypes::class) -@OptIn(ExperimentalStdlibApi::class) public class ${elementType}Range(start: $elementType, endInclusive: $elementType) : ${elementType}Progression(start, endInclusive, 1), ClosedRange<${elementType}>, OpenEndRange<${elementType}> { override val start: $elementType get() = first override val endInclusive: $elementType get() = last - @SinceKotlin("1.7") - @ExperimentalStdlibApi @Deprecated("Can throw an exception when it's impossible to represent the value with $elementType 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: $elementType get() { if (last == $elementType.MAX_VALUE) error("Cannot return the exclusive upper bound of a range that includes MAX_VALUE.") return last + 1u diff --git a/kotlin-native/runtime/src/main/kotlin/kotlin/Char.kt b/kotlin-native/runtime/src/main/kotlin/kotlin/Char.kt index ade51a6e5d9..67ca194fd70 100644 --- a/kotlin-native/runtime/src/main/kotlin/kotlin/Char.kt +++ b/kotlin-native/runtime/src/main/kotlin/kotlin/Char.kt @@ -63,8 +63,8 @@ public class Char private constructor() : Comparable { * * 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) public operator fun rangeUntil(other: Char): CharRange = this until other /** Returns the value of this character as a `Byte`. */ diff --git a/kotlin-native/runtime/src/main/kotlin/kotlin/Primitives.kt b/kotlin-native/runtime/src/main/kotlin/kotlin/Primitives.kt index 61c7013a21e..c5a4e0bc8e0 100644 --- a/kotlin-native/runtime/src/main/kotlin/kotlin/Primitives.kt +++ b/kotlin-native/runtime/src/main/kotlin/kotlin/Primitives.kt @@ -323,8 +323,8 @@ public final class Byte private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Byte): IntRange = this until other /** @@ -332,8 +332,8 @@ public final class Byte private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Short): IntRange = this until other /** @@ -341,8 +341,8 @@ public final class Byte private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Int): IntRange = this until other /** @@ -350,8 +350,8 @@ public final class Byte private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Long): LongRange = this until other /** Returns this value. */ @@ -754,8 +754,8 @@ public final class Short private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Byte): IntRange = this until other /** @@ -763,8 +763,8 @@ public final class Short private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Short): IntRange = this until other /** @@ -772,8 +772,8 @@ public final class Short private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Int): IntRange = this until other /** @@ -781,8 +781,8 @@ public final class Short private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Long): LongRange = this until other /** @@ -1183,8 +1183,8 @@ public final class Int private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Byte): IntRange = this until other /** @@ -1192,8 +1192,8 @@ public final class Int private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Short): IntRange = this until other /** @@ -1201,8 +1201,8 @@ public final class Int private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Int): IntRange = this until other /** @@ -1210,8 +1210,8 @@ public final class Int private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Long): LongRange = this until other /** @@ -1665,8 +1665,8 @@ public final class Long private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Byte): LongRange = this until other /** @@ -1674,8 +1674,8 @@ public final class Long private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Short): LongRange = this until other /** @@ -1683,8 +1683,8 @@ public final class Long private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Int): LongRange = this until other /** @@ -1692,8 +1692,8 @@ public final class Long private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Long): LongRange = this until other /** diff --git a/libraries/stdlib/api/js-v1/kotlin.kt b/libraries/stdlib/api/js-v1/kotlin.kt index de2ab322359..db7ebb07c2d 100644 --- a/libraries/stdlib/api/js-v1/kotlin.kt +++ b/libraries/stdlib/api/js-v1/kotlin.kt @@ -1073,20 +1073,20 @@ public final class Byte : kotlin.Number, kotlin.Comparable { public final operator fun rangeTo(other: kotlin.Short): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Byte): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Int): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Long): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Short): kotlin.ranges.IntRange @kotlin.SinceKotlin(version = "1.1") @@ -1212,8 +1212,8 @@ public final class Char : kotlin.Comparable { public final operator fun rangeTo(other: kotlin.Char): kotlin.ranges.CharRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Char): kotlin.ranges.CharRange @kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code.toByte()", imports = {})) @@ -2011,20 +2011,20 @@ public final class Int : kotlin.Number, kotlin.Comparable { public final operator fun rangeTo(other: kotlin.Short): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Byte): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Int): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Long): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Short): kotlin.ranges.IntRange @kotlin.SinceKotlin(version = "1.1") @@ -2280,20 +2280,20 @@ public final class Long : kotlin.Number, kotlin.Comparable { public final operator fun rangeTo(other: kotlin.Short): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Byte): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Int): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Long): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Short): kotlin.ranges.LongRange @kotlin.SinceKotlin(version = "1.1") @@ -2708,20 +2708,20 @@ public final class Short : kotlin.Number, kotlin.Comparable { public final operator fun rangeTo(other: kotlin.Short): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Byte): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Int): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Long): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Short): kotlin.ranges.IntRange @kotlin.SinceKotlin(version = "1.1") @@ -3025,8 +3025,8 @@ public final inline class UByte : kotlin.Comparable { @kotlin.internal.InlineOnly public final inline operator fun rangeTo(other: kotlin.UByte): kotlin.ranges.UIntRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) @kotlin.internal.InlineOnly public final inline operator fun rangeUntil(other: kotlin.UByte): kotlin.ranges.UIntRange @@ -3225,8 +3225,8 @@ public final inline class UInt : kotlin.Comparable { @kotlin.internal.InlineOnly public final inline operator fun rangeTo(other: kotlin.UInt): kotlin.ranges.UIntRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) @kotlin.internal.InlineOnly public final inline operator fun rangeUntil(other: kotlin.UInt): kotlin.ranges.UIntRange @@ -3431,8 +3431,8 @@ public final inline class ULong : kotlin.Comparable { @kotlin.internal.InlineOnly public final inline operator fun rangeTo(other: kotlin.ULong): kotlin.ranges.ULongRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) @kotlin.internal.InlineOnly public final inline operator fun rangeUntil(other: kotlin.ULong): kotlin.ranges.ULongRange @@ -3637,8 +3637,8 @@ public final inline class UShort : kotlin.Comparable { @kotlin.internal.InlineOnly public final inline operator fun rangeTo(other: kotlin.UShort): kotlin.ranges.UIntRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) @kotlin.internal.InlineOnly public final inline operator fun rangeUntil(other: kotlin.UShort): kotlin.ranges.UIntRange diff --git a/libraries/stdlib/api/js-v1/kotlin.ranges.kt b/libraries/stdlib/api/js-v1/kotlin.ranges.kt index cf6aedc2660..133f6c9e21d 100644 --- a/libraries/stdlib/api/js-v1/kotlin.ranges.kt +++ b/libraries/stdlib/api/js-v1/kotlin.ranges.kt @@ -109,8 +109,8 @@ public fun kotlin.UShort.coerceIn(minimumValue: kotlin.UShort, maximumValue: kot @kotlin.internal.InlineOnly public inline operator fun > R.contains(element: T?): kotlin.Boolean where R : kotlin.collections.Iterable -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) @kotlin.internal.InlineOnly public inline operator fun > R.contains(element: T?): kotlin.Boolean where R : kotlin.collections.Iterable @@ -267,68 +267,68 @@ public inline operator fun kotlin.ranges.LongRange.contains(element: kotlin.Long public inline operator fun kotlin.ranges.LongRange.contains(value: kotlin.Short): kotlin.Boolean @kotlin.jvm.JvmName(name = "byteRangeContains") -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun kotlin.ranges.OpenEndRange.contains(value: kotlin.Int): kotlin.Boolean @kotlin.jvm.JvmName(name = "byteRangeContains") -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun kotlin.ranges.OpenEndRange.contains(value: kotlin.Long): kotlin.Boolean @kotlin.jvm.JvmName(name = "byteRangeContains") -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun kotlin.ranges.OpenEndRange.contains(value: kotlin.Short): kotlin.Boolean @kotlin.jvm.JvmName(name = "doubleRangeContains") -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun kotlin.ranges.OpenEndRange.contains(value: kotlin.Float): kotlin.Boolean @kotlin.jvm.JvmName(name = "intRangeContains") -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun kotlin.ranges.OpenEndRange.contains(value: kotlin.Byte): kotlin.Boolean @kotlin.jvm.JvmName(name = "intRangeContains") -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun kotlin.ranges.OpenEndRange.contains(value: kotlin.Long): kotlin.Boolean @kotlin.jvm.JvmName(name = "intRangeContains") -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun kotlin.ranges.OpenEndRange.contains(value: kotlin.Short): kotlin.Boolean @kotlin.jvm.JvmName(name = "longRangeContains") -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun kotlin.ranges.OpenEndRange.contains(value: kotlin.Byte): kotlin.Boolean @kotlin.jvm.JvmName(name = "longRangeContains") -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun kotlin.ranges.OpenEndRange.contains(value: kotlin.Int): kotlin.Boolean @kotlin.jvm.JvmName(name = "longRangeContains") -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun kotlin.ranges.OpenEndRange.contains(value: kotlin.Short): kotlin.Boolean @kotlin.jvm.JvmName(name = "shortRangeContains") -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun kotlin.ranges.OpenEndRange.contains(value: kotlin.Byte): kotlin.Boolean @kotlin.jvm.JvmName(name = "shortRangeContains") -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun kotlin.ranges.OpenEndRange.contains(value: kotlin.Int): kotlin.Boolean @kotlin.jvm.JvmName(name = "shortRangeContains") -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun kotlin.ranges.OpenEndRange.contains(value: kotlin.Long): kotlin.Boolean @kotlin.SinceKotlin(version = "1.5") @@ -567,16 +567,16 @@ public operator fun kotlin.Double.rangeTo(that: kotlin.Double): kotlin.ranges.Cl @kotlin.SinceKotlin(version = "1.1") public operator fun kotlin.Float.rangeTo(that: kotlin.Float): kotlin.ranges.ClosedFloatingPointRange -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun > T.rangeUntil(that: T): kotlin.ranges.OpenEndRange -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun kotlin.Double.rangeUntil(that: kotlin.Double): kotlin.ranges.OpenEndRange -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun kotlin.Float.rangeUntil(that: kotlin.Float): kotlin.ranges.OpenEndRange public fun kotlin.ranges.CharProgression.reversed(): kotlin.ranges.CharProgression @@ -705,8 +705,8 @@ public final class CharRange : kotlin.ranges.CharProgression, kotlin.ranges.Clos public constructor CharRange(start: kotlin.Char, endInclusive: kotlin.Char) @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Char type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public open override val endExclusive: kotlin.Char { get; } public open override val endInclusive: kotlin.Char { get; } @@ -732,8 +732,8 @@ public final class CharRange : kotlin.ranges.CharProgression, kotlin.ranges.Clos /*∆*/ public constructor CharRange(start: kotlin.Char, endInclusive: kotlin.Char) /*∆*/ /*∆*/ @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Char type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") -/*∆*/ @kotlin.SinceKotlin(version = "1.7") -/*∆*/ @kotlin.ExperimentalStdlibApi +/*∆*/ @kotlin.SinceKotlin(version = "1.9") +/*∆*/ @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) /*∆*/ public open override val endExclusive: kotlin.Char { get; } /*∆*/ /*∆*/ public open override val endInclusive: kotlin.Char { get; } @@ -832,8 +832,8 @@ public final class IntRange : kotlin.ranges.IntProgression, kotlin.ranges.Closed public constructor IntRange(start: kotlin.Int, endInclusive: kotlin.Int) @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Int type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public open override val endExclusive: kotlin.Int { get; } public open override val endInclusive: kotlin.Int { get; } @@ -859,8 +859,8 @@ public final class IntRange : kotlin.ranges.IntProgression, kotlin.ranges.Closed /*∆*/ public constructor IntRange(start: kotlin.Int, endInclusive: kotlin.Int) /*∆*/ /*∆*/ @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Int type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") -/*∆*/ @kotlin.SinceKotlin(version = "1.7") -/*∆*/ @kotlin.ExperimentalStdlibApi +/*∆*/ @kotlin.SinceKotlin(version = "1.9") +/*∆*/ @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) /*∆*/ public open override val endExclusive: kotlin.Int { get; } /*∆*/ /*∆*/ public open override val endInclusive: kotlin.Int { get; } @@ -930,8 +930,8 @@ public final class LongRange : kotlin.ranges.LongProgression, kotlin.ranges.Clos public constructor LongRange(start: kotlin.Long, endInclusive: kotlin.Long) @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Long type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public open override val endExclusive: kotlin.Long { get; } public open override val endInclusive: kotlin.Long { get; } @@ -957,8 +957,8 @@ public final class LongRange : kotlin.ranges.LongProgression, kotlin.ranges.Clos /*∆*/ public constructor LongRange(start: kotlin.Long, endInclusive: kotlin.Long) /*∆*/ /*∆*/ @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Long type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") -/*∆*/ @kotlin.SinceKotlin(version = "1.7") -/*∆*/ @kotlin.ExperimentalStdlibApi +/*∆*/ @kotlin.SinceKotlin(version = "1.9") +/*∆*/ @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) /*∆*/ public open override val endExclusive: kotlin.Long { get; } /*∆*/ /*∆*/ public open override val endInclusive: kotlin.Long { get; } @@ -980,8 +980,8 @@ public final class LongRange : kotlin.ranges.LongProgression, kotlin.ranges.Clos /*∆*/ } /*∆*/ } /*∆*/ -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public interface OpenEndRange> { public abstract val endExclusive: T { get; } @@ -992,8 +992,8 @@ public interface OpenEndRange> { public open fun isEmpty(): kotlin.Boolean } -/*∆*/ @kotlin.SinceKotlin(version = "1.7") -/*∆*/ @kotlin.ExperimentalStdlibApi +/*∆*/ @kotlin.SinceKotlin(version = "1.9") +/*∆*/ @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) /*∆*/ public interface OpenEndRange> { /*∆*/ public abstract val endExclusive: T { get; } /*∆*/ @@ -1033,9 +1033,9 @@ public open class UIntProgression : kotlin.collections.Iterable { public final class UIntRange : kotlin.ranges.UIntProgression, kotlin.ranges.ClosedRange, kotlin.ranges.OpenEndRange { public constructor UIntRange(start: kotlin.UInt, endInclusive: kotlin.UInt) - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi @kotlin.Deprecated(message = "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.") + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public open override val endExclusive: kotlin.UInt { get; } public open override val endInclusive: kotlin.UInt { get; } @@ -1086,9 +1086,9 @@ public open class ULongProgression : kotlin.collections.Iterable { public final class ULongRange : kotlin.ranges.ULongProgression, kotlin.ranges.ClosedRange, kotlin.ranges.OpenEndRange { public constructor ULongRange(start: kotlin.ULong, endInclusive: kotlin.ULong) - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi @kotlin.Deprecated(message = "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.") + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public open override val endExclusive: kotlin.ULong { get; } public open override val endInclusive: kotlin.ULong { get; } diff --git a/libraries/stdlib/api/js/kotlin.kt b/libraries/stdlib/api/js/kotlin.kt index 0b9850506a7..5b379d334e1 100644 --- a/libraries/stdlib/api/js/kotlin.kt +++ b/libraries/stdlib/api/js/kotlin.kt @@ -1034,20 +1034,20 @@ public final class Byte : kotlin.Number, kotlin.Comparable { public final operator fun rangeTo(other: kotlin.Short): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Byte): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Int): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Long): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Short): kotlin.ranges.IntRange @kotlin.SinceKotlin(version = "1.1") @@ -1179,8 +1179,8 @@ public final class Char : kotlin.Comparable { public final operator fun rangeTo(other: kotlin.Char): kotlin.ranges.CharRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Char): kotlin.ranges.CharRange @kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code.toByte()", imports = {})) @@ -1956,20 +1956,20 @@ public final class Int : kotlin.Number, kotlin.Comparable { public final operator fun rangeTo(other: kotlin.Short): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Byte): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Int): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Long): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Short): kotlin.ranges.IntRange @kotlin.SinceKotlin(version = "1.1") @@ -2228,20 +2228,20 @@ public final class Long : kotlin.Number, kotlin.Comparable { public final operator fun rangeTo(other: kotlin.Short): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Byte): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Int): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Long): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Short): kotlin.ranges.LongRange @kotlin.SinceKotlin(version = "1.1") @@ -2632,20 +2632,20 @@ public final class Short : kotlin.Number, kotlin.Comparable { public final operator fun rangeTo(other: kotlin.Short): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Byte): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Int): kotlin.ranges.IntRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Long): kotlin.ranges.LongRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final operator fun rangeUntil(other: kotlin.Short): kotlin.ranges.IntRange @kotlin.SinceKotlin(version = "1.1") @@ -2944,8 +2944,8 @@ public final inline class UByte : kotlin.Comparable { @kotlin.internal.InlineOnly public final inline operator fun rangeTo(other: kotlin.UByte): kotlin.ranges.UIntRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) @kotlin.internal.InlineOnly public final inline operator fun rangeUntil(other: kotlin.UByte): kotlin.ranges.UIntRange @@ -3144,8 +3144,8 @@ public final inline class UInt : kotlin.Comparable { @kotlin.internal.InlineOnly public final inline operator fun rangeTo(other: kotlin.UInt): kotlin.ranges.UIntRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) @kotlin.internal.InlineOnly public final inline operator fun rangeUntil(other: kotlin.UInt): kotlin.ranges.UIntRange @@ -3350,8 +3350,8 @@ public final inline class ULong : kotlin.Comparable { @kotlin.internal.InlineOnly public final inline operator fun rangeTo(other: kotlin.ULong): kotlin.ranges.ULongRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) @kotlin.internal.InlineOnly public final inline operator fun rangeUntil(other: kotlin.ULong): kotlin.ranges.ULongRange @@ -3556,8 +3556,8 @@ public final inline class UShort : kotlin.Comparable { @kotlin.internal.InlineOnly public final inline operator fun rangeTo(other: kotlin.UShort): kotlin.ranges.UIntRange - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) @kotlin.internal.InlineOnly public final inline operator fun rangeUntil(other: kotlin.UShort): kotlin.ranges.UIntRange diff --git a/libraries/stdlib/api/js/kotlin.ranges.kt b/libraries/stdlib/api/js/kotlin.ranges.kt index f01c5c33405..badcabfc102 100644 --- a/libraries/stdlib/api/js/kotlin.ranges.kt +++ b/libraries/stdlib/api/js/kotlin.ranges.kt @@ -109,8 +109,8 @@ public fun kotlin.UShort.coerceIn(minimumValue: kotlin.UShort, maximumValue: kot @kotlin.internal.InlineOnly public inline operator fun > R.contains(element: T?): kotlin.Boolean where R : kotlin.collections.Iterable -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) @kotlin.internal.InlineOnly public inline operator fun > R.contains(element: T?): kotlin.Boolean where R : kotlin.collections.Iterable @@ -267,68 +267,68 @@ public inline operator fun kotlin.ranges.LongRange.contains(element: kotlin.Long public inline operator fun kotlin.ranges.LongRange.contains(value: kotlin.Short): kotlin.Boolean @kotlin.jvm.JvmName(name = "byteRangeContains") -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun kotlin.ranges.OpenEndRange.contains(value: kotlin.Int): kotlin.Boolean @kotlin.jvm.JvmName(name = "byteRangeContains") -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun kotlin.ranges.OpenEndRange.contains(value: kotlin.Long): kotlin.Boolean @kotlin.jvm.JvmName(name = "byteRangeContains") -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun kotlin.ranges.OpenEndRange.contains(value: kotlin.Short): kotlin.Boolean @kotlin.jvm.JvmName(name = "doubleRangeContains") -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun kotlin.ranges.OpenEndRange.contains(value: kotlin.Float): kotlin.Boolean @kotlin.jvm.JvmName(name = "intRangeContains") -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun kotlin.ranges.OpenEndRange.contains(value: kotlin.Byte): kotlin.Boolean @kotlin.jvm.JvmName(name = "intRangeContains") -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun kotlin.ranges.OpenEndRange.contains(value: kotlin.Long): kotlin.Boolean @kotlin.jvm.JvmName(name = "intRangeContains") -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun kotlin.ranges.OpenEndRange.contains(value: kotlin.Short): kotlin.Boolean @kotlin.jvm.JvmName(name = "longRangeContains") -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun kotlin.ranges.OpenEndRange.contains(value: kotlin.Byte): kotlin.Boolean @kotlin.jvm.JvmName(name = "longRangeContains") -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun kotlin.ranges.OpenEndRange.contains(value: kotlin.Int): kotlin.Boolean @kotlin.jvm.JvmName(name = "longRangeContains") -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun kotlin.ranges.OpenEndRange.contains(value: kotlin.Short): kotlin.Boolean @kotlin.jvm.JvmName(name = "shortRangeContains") -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun kotlin.ranges.OpenEndRange.contains(value: kotlin.Byte): kotlin.Boolean @kotlin.jvm.JvmName(name = "shortRangeContains") -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun kotlin.ranges.OpenEndRange.contains(value: kotlin.Int): kotlin.Boolean @kotlin.jvm.JvmName(name = "shortRangeContains") -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun kotlin.ranges.OpenEndRange.contains(value: kotlin.Long): kotlin.Boolean @kotlin.SinceKotlin(version = "1.5") @@ -567,16 +567,16 @@ public operator fun kotlin.Double.rangeTo(that: kotlin.Double): kotlin.ranges.Cl @kotlin.SinceKotlin(version = "1.1") public operator fun kotlin.Float.rangeTo(that: kotlin.Float): kotlin.ranges.ClosedFloatingPointRange -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun > T.rangeUntil(that: T): kotlin.ranges.OpenEndRange -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun kotlin.Double.rangeUntil(that: kotlin.Double): kotlin.ranges.OpenEndRange -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public operator fun kotlin.Float.rangeUntil(that: kotlin.Float): kotlin.ranges.OpenEndRange public fun kotlin.ranges.CharProgression.reversed(): kotlin.ranges.CharProgression @@ -683,8 +683,8 @@ public final class CharRange : kotlin.ranges.CharProgression, kotlin.ranges.Clos public constructor CharRange(start: kotlin.Char, endInclusive: kotlin.Char) @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Char type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public open override val endExclusive: kotlin.Char { get; } public open override val endInclusive: kotlin.Char { get; } @@ -751,8 +751,8 @@ public final class IntRange : kotlin.ranges.IntProgression, kotlin.ranges.Closed public constructor IntRange(start: kotlin.Int, endInclusive: kotlin.Int) @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Int type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public open override val endExclusive: kotlin.Int { get; } public open override val endInclusive: kotlin.Int { get; } @@ -800,8 +800,8 @@ public final class LongRange : kotlin.ranges.LongProgression, kotlin.ranges.Clos public constructor LongRange(start: kotlin.Long, endInclusive: kotlin.Long) @kotlin.Deprecated(message = "Can throw an exception when it's impossible to represent the value with Long type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public open override val endExclusive: kotlin.Long { get; } public open override val endInclusive: kotlin.Long { get; } @@ -823,8 +823,8 @@ public final class LongRange : kotlin.ranges.LongProgression, kotlin.ranges.Clos } } -@kotlin.SinceKotlin(version = "1.7") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.9") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public interface OpenEndRange> { public abstract val endExclusive: T { get; } @@ -864,9 +864,9 @@ public open class UIntProgression : kotlin.collections.Iterable { public final class UIntRange : kotlin.ranges.UIntProgression, kotlin.ranges.ClosedRange, kotlin.ranges.OpenEndRange { public constructor UIntRange(start: kotlin.UInt, endInclusive: kotlin.UInt) - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi @kotlin.Deprecated(message = "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.") + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public open override val endExclusive: kotlin.UInt { get; } public open override val endInclusive: kotlin.UInt { get; } @@ -917,9 +917,9 @@ public open class ULongProgression : kotlin.collections.Iterable { public final class ULongRange : kotlin.ranges.ULongProgression, kotlin.ranges.ClosedRange, kotlin.ranges.OpenEndRange { public constructor ULongRange(start: kotlin.ULong, endInclusive: kotlin.ULong) - @kotlin.SinceKotlin(version = "1.7") - @kotlin.ExperimentalStdlibApi @kotlin.Deprecated(message = "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.") + @kotlin.SinceKotlin(version = "1.9") + @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public open override val endExclusive: kotlin.ULong { get; } public open override val endInclusive: kotlin.ULong { get; } diff --git a/libraries/stdlib/common/src/generated/_Ranges.kt b/libraries/stdlib/common/src/generated/_Ranges.kt index e0d74ef9c27..b7e7eedc369 100644 --- a/libraries/stdlib/common/src/generated/_Ranges.kt +++ b/libraries/stdlib/common/src/generated/_Ranges.kt @@ -366,8 +366,8 @@ public operator fun ClosedRange.contains(value: Byte): Boolean { * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("intRangeContains") -@SinceKotlin("1.7") -@ExperimentalStdlibApi +@SinceKotlin("1.9") +@WasExperimental(ExperimentalStdlibApi::class) public operator fun OpenEndRange.contains(value: Byte): Boolean { return contains(value.toInt()) } @@ -376,8 +376,8 @@ public operator fun OpenEndRange.contains(value: Byte): Boolean { * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("longRangeContains") -@SinceKotlin("1.7") -@ExperimentalStdlibApi +@SinceKotlin("1.9") +@WasExperimental(ExperimentalStdlibApi::class) public operator fun OpenEndRange.contains(value: Byte): Boolean { return contains(value.toLong()) } @@ -386,8 +386,8 @@ public operator fun OpenEndRange.contains(value: Byte): Boolean { * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("shortRangeContains") -@SinceKotlin("1.7") -@ExperimentalStdlibApi +@SinceKotlin("1.9") +@WasExperimental(ExperimentalStdlibApi::class) public operator fun OpenEndRange.contains(value: Byte): Boolean { return contains(value.toShort()) } @@ -508,8 +508,8 @@ public operator fun ClosedRange.contains(value: Float): Boolean { * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("doubleRangeContains") -@SinceKotlin("1.7") -@ExperimentalStdlibApi +@SinceKotlin("1.9") +@WasExperimental(ExperimentalStdlibApi::class) public operator fun OpenEndRange.contains(value: Float): Boolean { return contains(value.toDouble()) } @@ -562,8 +562,8 @@ public operator fun ClosedRange.contains(value: Int): Boolean { * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("longRangeContains") -@SinceKotlin("1.7") -@ExperimentalStdlibApi +@SinceKotlin("1.9") +@WasExperimental(ExperimentalStdlibApi::class) public operator fun OpenEndRange.contains(value: Int): Boolean { return contains(value.toLong()) } @@ -572,8 +572,8 @@ public operator fun OpenEndRange.contains(value: Int): Boolean { * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("byteRangeContains") -@SinceKotlin("1.7") -@ExperimentalStdlibApi +@SinceKotlin("1.9") +@WasExperimental(ExperimentalStdlibApi::class) public operator fun OpenEndRange.contains(value: Int): Boolean { return value.toByteExactOrNull().let { if (it != null) contains(it) else false } } @@ -582,8 +582,8 @@ public operator fun OpenEndRange.contains(value: Int): Boolean { * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("shortRangeContains") -@SinceKotlin("1.7") -@ExperimentalStdlibApi +@SinceKotlin("1.9") +@WasExperimental(ExperimentalStdlibApi::class) public operator fun OpenEndRange.contains(value: Int): Boolean { return value.toShortExactOrNull().let { if (it != null) contains(it) else false } } @@ -644,8 +644,8 @@ public operator fun ClosedRange.contains(value: Long): Boolean { * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("intRangeContains") -@SinceKotlin("1.7") -@ExperimentalStdlibApi +@SinceKotlin("1.9") +@WasExperimental(ExperimentalStdlibApi::class) public operator fun OpenEndRange.contains(value: Long): Boolean { return value.toIntExactOrNull().let { if (it != null) contains(it) else false } } @@ -654,8 +654,8 @@ public operator fun OpenEndRange.contains(value: Long): Boolean { * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("byteRangeContains") -@SinceKotlin("1.7") -@ExperimentalStdlibApi +@SinceKotlin("1.9") +@WasExperimental(ExperimentalStdlibApi::class) public operator fun OpenEndRange.contains(value: Long): Boolean { return value.toByteExactOrNull().let { if (it != null) contains(it) else false } } @@ -664,8 +664,8 @@ public operator fun OpenEndRange.contains(value: Long): Boolean { * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("shortRangeContains") -@SinceKotlin("1.7") -@ExperimentalStdlibApi +@SinceKotlin("1.9") +@WasExperimental(ExperimentalStdlibApi::class) public operator fun OpenEndRange.contains(value: Long): Boolean { return value.toShortExactOrNull().let { if (it != null) contains(it) else false } } @@ -726,8 +726,8 @@ public operator fun ClosedRange.contains(value: Short): Boolean { * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("intRangeContains") -@SinceKotlin("1.7") -@ExperimentalStdlibApi +@SinceKotlin("1.9") +@WasExperimental(ExperimentalStdlibApi::class) public operator fun OpenEndRange.contains(value: Short): Boolean { return contains(value.toInt()) } @@ -736,8 +736,8 @@ public operator fun OpenEndRange.contains(value: Short): Boolean { * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("longRangeContains") -@SinceKotlin("1.7") -@ExperimentalStdlibApi +@SinceKotlin("1.9") +@WasExperimental(ExperimentalStdlibApi::class) public operator fun OpenEndRange.contains(value: Short): Boolean { return contains(value.toLong()) } @@ -746,8 +746,8 @@ public operator fun OpenEndRange.contains(value: Short): Boolean { * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("byteRangeContains") -@SinceKotlin("1.7") -@ExperimentalStdlibApi +@SinceKotlin("1.9") +@WasExperimental(ExperimentalStdlibApi::class) public operator fun OpenEndRange.contains(value: Short): Boolean { return value.toByteExactOrNull().let { if (it != null) contains(it) else false } } diff --git a/libraries/stdlib/js-ir/builtins/Char.kt b/libraries/stdlib/js-ir/builtins/Char.kt index 1d5c3354522..2f305bd485c 100644 --- a/libraries/stdlib/js-ir/builtins/Char.kt +++ b/libraries/stdlib/js-ir/builtins/Char.kt @@ -62,8 +62,8 @@ internal constructor(private val value: Int) : Comparable { * * 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) public operator fun rangeUntil(other: Char): CharRange = this until other diff --git a/libraries/stdlib/js-ir/builtins/Primitives.kt b/libraries/stdlib/js-ir/builtins/Primitives.kt index f347fa198bc..7d94c3f0c0b 100644 --- a/libraries/stdlib/js-ir/builtins/Primitives.kt +++ b/libraries/stdlib/js-ir/builtins/Primitives.kt @@ -272,8 +272,8 @@ public class Byte private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Byte): IntRange = this until other /** @@ -281,8 +281,8 @@ public class Byte private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Short): IntRange = this until other /** @@ -290,8 +290,8 @@ public class Byte private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Int): IntRange = this until other /** @@ -299,8 +299,8 @@ public class Byte private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Long): LongRange = this until other /** Returns this value. */ @@ -641,8 +641,8 @@ public class Short private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Byte): IntRange = this until other /** @@ -650,8 +650,8 @@ public class Short private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Short): IntRange = this until other /** @@ -659,8 +659,8 @@ public class Short private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Int): IntRange = this until other /** @@ -668,8 +668,8 @@ public class Short private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Long): LongRange = this until other /** @@ -1008,8 +1008,8 @@ public class Int private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Byte): IntRange = this until other /** @@ -1017,8 +1017,8 @@ public class Int private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Short): IntRange = this until other /** @@ -1026,8 +1026,8 @@ public class Int private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Int): IntRange = this until other /** @@ -1035,8 +1035,8 @@ public class Int private constructor() : Number(), Comparable { * * 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) public operator fun rangeUntil(other: Long): LongRange = this until other /** diff --git a/libraries/stdlib/js-ir/runtime/long.kt b/libraries/stdlib/js-ir/runtime/long.kt index 367f8786db0..78f34d94b41 100644 --- a/libraries/stdlib/js-ir/runtime/long.kt +++ b/libraries/stdlib/js-ir/runtime/long.kt @@ -276,8 +276,8 @@ public class Long internal constructor( * * 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) public operator fun rangeUntil(other: Byte): LongRange = this until other /** @@ -285,8 +285,8 @@ public class Long internal constructor( * * 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) public operator fun rangeUntil(other: Short): LongRange = this until other /** @@ -294,8 +294,8 @@ public class Long internal constructor( * * 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) public operator fun rangeUntil(other: Int): LongRange = this until other /** @@ -303,8 +303,8 @@ public class Long internal constructor( * * 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) public operator fun rangeUntil(other: Long): LongRange = this until other /** diff --git a/libraries/stdlib/src/kotlin/ranges/PrimitiveRanges.kt b/libraries/stdlib/src/kotlin/ranges/PrimitiveRanges.kt index 007d8ef06a9..e498826f3f5 100644 --- a/libraries/stdlib/src/kotlin/ranges/PrimitiveRanges.kt +++ b/libraries/stdlib/src/kotlin/ranges/PrimitiveRanges.kt @@ -10,14 +10,13 @@ package kotlin.ranges /** * A range of values of type `Char`. */ -@OptIn(ExperimentalStdlibApi::class) public class CharRange(start: Char, endInclusive: Char) : CharProgression(start, endInclusive, 1), ClosedRange, OpenEndRange { override val start: Char get() = first override val endInclusive: Char get() = last @Deprecated("Can throw an exception when it's impossible to represent the value with Char type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") - @SinceKotlin("1.7") - @ExperimentalStdlibApi + @SinceKotlin("1.9") + @WasExperimental(ExperimentalStdlibApi::class) override val endExclusive: Char get() { if (last == Char.MAX_VALUE) error("Cannot return the exclusive upper bound of a range that includes MAX_VALUE.") return last + 1 @@ -50,14 +49,13 @@ public class CharRange(start: Char, endInclusive: Char) : CharProgression(start, /** * A range of values of type `Int`. */ -@OptIn(ExperimentalStdlibApi::class) public class IntRange(start: Int, endInclusive: Int) : IntProgression(start, endInclusive, 1), ClosedRange, OpenEndRange { override val start: Int get() = first override val endInclusive: Int get() = last @Deprecated("Can throw an exception when it's impossible to represent the value with Int type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") - @SinceKotlin("1.7") - @ExperimentalStdlibApi + @SinceKotlin("1.9") + @WasExperimental(ExperimentalStdlibApi::class) override val endExclusive: Int get() { if (last == Int.MAX_VALUE) error("Cannot return the exclusive upper bound of a range that includes MAX_VALUE.") return last + 1 @@ -90,14 +88,13 @@ public class IntRange(start: Int, endInclusive: Int) : IntProgression(start, end /** * A range of values of type `Long`. */ -@OptIn(ExperimentalStdlibApi::class) public class LongRange(start: Long, endInclusive: Long) : LongProgression(start, endInclusive, 1), ClosedRange, OpenEndRange { override val start: Long get() = first override val endInclusive: Long get() = last @Deprecated("Can throw an exception when it's impossible to represent the value with Long type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.") - @SinceKotlin("1.7") - @ExperimentalStdlibApi + @SinceKotlin("1.9") + @WasExperimental(ExperimentalStdlibApi::class) override val endExclusive: Long get() { if (last == Long.MAX_VALUE) error("Cannot return the exclusive upper bound of a range that includes MAX_VALUE.") return last + 1 diff --git a/libraries/stdlib/src/kotlin/ranges/Range.kt b/libraries/stdlib/src/kotlin/ranges/Range.kt index 695592f0599..95c66aa76e3 100644 --- a/libraries/stdlib/src/kotlin/ranges/Range.kt +++ b/libraries/stdlib/src/kotlin/ranges/Range.kt @@ -39,8 +39,8 @@ public interface ClosedRange> { * Represents a range of values (for example, numbers or characters) where the upper bound is not included in the range. * See the [Kotlin language documentation](https://kotlinlang.org/docs/reference/ranges.html) for more information. */ -@SinceKotlin("1.7") -@ExperimentalStdlibApi +@SinceKotlin("1.9") +@WasExperimental(ExperimentalStdlibApi::class) public interface OpenEndRange> { /** * The minimum value in the range. diff --git a/libraries/stdlib/src/kotlin/ranges/Ranges.kt b/libraries/stdlib/src/kotlin/ranges/Ranges.kt index f911f77eefc..cb3ad36b015 100644 --- a/libraries/stdlib/src/kotlin/ranges/Ranges.kt +++ b/libraries/stdlib/src/kotlin/ranges/Ranges.kt @@ -39,7 +39,6 @@ public operator fun > T.rangeTo(that: T): ClosedRange = Com /** * Represents a range of [Comparable] values. */ -@OptIn(ExperimentalStdlibApi::class) private open class ComparableOpenEndRange>( override val start: T, override val endExclusive: T @@ -63,8 +62,8 @@ private open class ComparableOpenEndRange>( * This value needs to be smaller than [that] value, otherwise the returned range will be empty. * @sample samples.ranges.Ranges.rangeFromComparable */ -@SinceKotlin("1.7") -@ExperimentalStdlibApi +@SinceKotlin("1.9") +@WasExperimental(ExperimentalStdlibApi::class) public operator fun > T.rangeUntil(that: T): OpenEndRange = ComparableOpenEndRange(this, that) @@ -132,7 +131,6 @@ public operator fun Double.rangeTo(that: Double): ClosedFloatingPointRange = OpenEndDoubleRange(this, that) @@ -215,7 +213,6 @@ public operator fun Float.rangeTo(that: Float): ClosedFloatingPointRange * * Numbers are compared with the ends of this range according to IEEE-754. */ -@OptIn(ExperimentalStdlibApi::class) private class OpenEndFloatRange( start: Float, endExclusive: Float @@ -247,8 +244,8 @@ private class OpenEndFloatRange( * * Numbers are compared with the ends of this range according to IEEE-754. */ -@SinceKotlin("1.7") -@ExperimentalStdlibApi +@SinceKotlin("1.9") +@WasExperimental(ExperimentalStdlibApi::class) public operator fun Float.rangeUntil(that: Float): OpenEndRange = OpenEndFloatRange(this, that) @@ -267,8 +264,8 @@ public inline operator fun R.contains(element: T?): Boolean where T : Any * * Always returns `false` if the [element] is `null`. */ -@SinceKotlin("1.7") -@ExperimentalStdlibApi +@SinceKotlin("1.9") +@WasExperimental(ExperimentalStdlibApi::class) @kotlin.internal.InlineOnly public inline operator fun R.contains(element: T?): Boolean where T : Any, R : OpenEndRange, R : Iterable = element != null && contains(element) diff --git a/libraries/stdlib/unsigned/src/kotlin/UByte.kt b/libraries/stdlib/unsigned/src/kotlin/UByte.kt index 7dd31d082df..81bf6deb883 100644 --- a/libraries/stdlib/unsigned/src/kotlin/UByte.kt +++ b/libraries/stdlib/unsigned/src/kotlin/UByte.kt @@ -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() diff --git a/libraries/stdlib/unsigned/src/kotlin/UInt.kt b/libraries/stdlib/unsigned/src/kotlin/UInt.kt index 32352140acc..5b0bc32d162 100644 --- a/libraries/stdlib/unsigned/src/kotlin/UInt.kt +++ b/libraries/stdlib/unsigned/src/kotlin/UInt.kt @@ -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 diff --git a/libraries/stdlib/unsigned/src/kotlin/UIntRange.kt b/libraries/stdlib/unsigned/src/kotlin/UIntRange.kt index da4d810d84b..fa2d8bf97ad 100644 --- a/libraries/stdlib/unsigned/src/kotlin/UIntRange.kt +++ b/libraries/stdlib/unsigned/src/kotlin/UIntRange.kt @@ -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, OpenEndRange { 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 diff --git a/libraries/stdlib/unsigned/src/kotlin/ULong.kt b/libraries/stdlib/unsigned/src/kotlin/ULong.kt index bed1a20214a..4d06a8724c1 100644 --- a/libraries/stdlib/unsigned/src/kotlin/ULong.kt +++ b/libraries/stdlib/unsigned/src/kotlin/ULong.kt @@ -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 diff --git a/libraries/stdlib/unsigned/src/kotlin/ULongRange.kt b/libraries/stdlib/unsigned/src/kotlin/ULongRange.kt index 3689d006704..376d1cbc78e 100644 --- a/libraries/stdlib/unsigned/src/kotlin/ULongRange.kt +++ b/libraries/stdlib/unsigned/src/kotlin/ULongRange.kt @@ -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, OpenEndRange { 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 diff --git a/libraries/stdlib/unsigned/src/kotlin/UShort.kt b/libraries/stdlib/unsigned/src/kotlin/UShort.kt index 560f13f7a07..e9579a53630 100644 --- a/libraries/stdlib/unsigned/src/kotlin/UShort.kt +++ b/libraries/stdlib/unsigned/src/kotlin/UShort.kt @@ -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() diff --git a/libraries/stdlib/wasm/builtins/kotlin/Char.kt b/libraries/stdlib/wasm/builtins/kotlin/Char.kt index 71612243a43..f5409868079 100644 --- a/libraries/stdlib/wasm/builtins/kotlin/Char.kt +++ b/libraries/stdlib/wasm/builtins/kotlin/Char.kt @@ -73,8 +73,8 @@ public class Char private constructor(private val value: Char) : Comparable operator() specialFor(OpenRanges) { - since("1.7") - annotation("@ExperimentalStdlibApi") + since("1.9") + annotation("@WasExperimental(ExperimentalStdlibApi::class)") } signature("contains(value: $itemType)")