Clean up WasExperimental annotation from declarations with SinceKotlin<=1.4

Since it is not possible to use -api-version < 1.4, this annotation has no effect
This commit is contained in:
Ilya Gorbunov
2023-11-07 15:07:42 +01:00
committed by Space Team
parent 081e1de5af
commit 9ccce52915
33 changed files with 3 additions and 464 deletions
@@ -245,7 +245,6 @@ public fun CharSequence.random(random: Random): Char {
* Returns a random character from this char sequence, or `null` if this char sequence is empty.
*/
@SinceKotlin("1.4")
@WasExperimental(ExperimentalStdlibApi::class)
@kotlin.internal.InlineOnly
public inline fun CharSequence.randomOrNull(): Char? {
return randomOrNull(Random)
@@ -255,7 +254,6 @@ public inline fun CharSequence.randomOrNull(): Char? {
* Returns a random character from this char sequence using the specified source of randomness, or `null` if this char sequence is empty.
*/
@SinceKotlin("1.4")
@WasExperimental(ExperimentalStdlibApi::class)
public fun CharSequence.randomOrNull(random: Random): Char? {
if (isEmpty())
return null
@@ -1864,7 +1862,6 @@ public inline fun CharSequence.reduceIndexedOrNull(operation: (index: Int, acc:
* @sample samples.collections.Collections.Aggregates.reduceOrNull
*/
@SinceKotlin("1.4")
@WasExperimental(ExperimentalStdlibApi::class)
public inline fun CharSequence.reduceOrNull(operation: (acc: Char, Char) -> Char): Char? {
if (isEmpty())
return null
@@ -1955,7 +1952,6 @@ public inline fun CharSequence.reduceRightIndexedOrNull(operation: (index: Int,
* @sample samples.collections.Collections.Aggregates.reduceRightOrNull
*/
@SinceKotlin("1.4")
@WasExperimental(ExperimentalStdlibApi::class)
public inline fun CharSequence.reduceRightOrNull(operation: (Char, acc: Char) -> Char): Char? {
var index = lastIndex
if (index < 0) return null
@@ -2072,7 +2068,6 @@ public inline fun CharSequence.runningReduceIndexed(operation: (index: Int, acc:
* @sample samples.collections.Collections.Aggregates.scan
*/
@SinceKotlin("1.4")
@WasExperimental(ExperimentalStdlibApi::class)
public inline fun <R> CharSequence.scan(initial: R, operation: (acc: R, Char) -> R): List<R> {
return runningFold(initial, operation)
}
@@ -2090,7 +2085,6 @@ public inline fun <R> CharSequence.scan(initial: R, operation: (acc: R, Char) ->
* @sample samples.collections.Collections.Aggregates.scan
*/
@SinceKotlin("1.4")
@WasExperimental(ExperimentalStdlibApi::class)
public inline fun <R> CharSequence.scanIndexed(initial: R, operation: (index: Int, acc: R, Char) -> R): List<R> {
return runningFoldIndexed(initial, operation)
}