Migrate UseExperimental->OptIn in project sources
This commit is contained in:
@@ -67,7 +67,7 @@ public inline fun <C, R> C.ifEmpty(defaultValue: () -> R): R where C : Array<*>,
|
||||
if (isEmpty()) defaultValue() else this
|
||||
|
||||
|
||||
@UseExperimental(ExperimentalUnsignedTypes::class)
|
||||
@OptIn(ExperimentalUnsignedTypes::class)
|
||||
@SinceKotlin("1.3")
|
||||
@PublishedApi
|
||||
@kotlin.jvm.JvmName("contentDeepEquals")
|
||||
@@ -120,7 +120,7 @@ internal fun <T> Array<out T>.contentDeepToStringImpl(): String {
|
||||
}
|
||||
}
|
||||
|
||||
@UseExperimental(ExperimentalUnsignedTypes::class)
|
||||
@OptIn(ExperimentalUnsignedTypes::class)
|
||||
private fun <T> Array<out T>.contentDeepToStringInternal(result: StringBuilder, processed: MutableList<Array<*>>) {
|
||||
if (this in processed) {
|
||||
result.append("[...]")
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
@file:kotlin.jvm.JvmMultifileClass
|
||||
@file:kotlin.jvm.JvmName("CollectionsKt")
|
||||
@file:UseExperimental(kotlin.experimental.ExperimentalTypeInference::class)
|
||||
@file:OptIn(kotlin.experimental.ExperimentalTypeInference::class)
|
||||
|
||||
package kotlin.collections
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
@file:kotlin.jvm.JvmMultifileClass
|
||||
@file:kotlin.jvm.JvmName("MapsKt")
|
||||
@file:UseExperimental(kotlin.experimental.ExperimentalTypeInference::class)
|
||||
@file:OptIn(kotlin.experimental.ExperimentalTypeInference::class)
|
||||
|
||||
package kotlin.collections
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
@file:kotlin.jvm.JvmMultifileClass
|
||||
@file:kotlin.jvm.JvmName("SequencesKt")
|
||||
@file:UseExperimental(ExperimentalTypeInference::class)
|
||||
@file:OptIn(ExperimentalTypeInference::class)
|
||||
|
||||
package kotlin.sequences
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
@file:kotlin.jvm.JvmMultifileClass
|
||||
@file:kotlin.jvm.JvmName("SetsKt")
|
||||
@file:UseExperimental(kotlin.experimental.ExperimentalTypeInference::class)
|
||||
@file:OptIn(kotlin.experimental.ExperimentalTypeInference::class)
|
||||
|
||||
package kotlin.collections
|
||||
|
||||
|
||||
@@ -338,7 +338,7 @@ public fun Random.nextLong(range: LongRange): Long = when {
|
||||
internal expect fun defaultPlatformRandom(): Random
|
||||
internal expect fun doubleFromParts(hi26: Int, low27: Int): Double
|
||||
|
||||
@UseExperimental(ExperimentalStdlibApi::class)
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
internal fun fastLog2(value: Int): Int = 31 - value.countLeadingZeroBits()
|
||||
|
||||
/** Takes upper [bitCount] bits (0..32) from this number. */
|
||||
|
||||
@@ -438,7 +438,7 @@ public fun String.substringAfterLast(delimiter: String, missingDelimiterValue: S
|
||||
* @param startIndex the index of the first character to be replaced.
|
||||
* @param endIndex the index of the first character after the replacement to keep in the string.
|
||||
*/
|
||||
@UseExperimental(ExperimentalStdlibApi::class)
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
public fun CharSequence.replaceRange(startIndex: Int, endIndex: Int, replacement: CharSequence): CharSequence {
|
||||
if (endIndex < startIndex)
|
||||
throw IndexOutOfBoundsException("End index ($endIndex) is less than start index ($startIndex).")
|
||||
@@ -484,7 +484,7 @@ public inline fun String.replaceRange(range: IntRange, replacement: CharSequence
|
||||
*
|
||||
* [endIndex] is not included in the removed part.
|
||||
*/
|
||||
@UseExperimental(ExperimentalStdlibApi::class)
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
public fun CharSequence.removeRange(startIndex: Int, endIndex: Int): CharSequence {
|
||||
if (endIndex < startIndex)
|
||||
throw IndexOutOfBoundsException("End index ($endIndex) is less than start index ($startIndex).")
|
||||
|
||||
@@ -7,7 +7,7 @@ package kotlin.time
|
||||
|
||||
import kotlin.math.abs
|
||||
|
||||
@UseExperimental(ExperimentalTime::class)
|
||||
@OptIn(ExperimentalTime::class)
|
||||
private inline val storageUnit get() = DurationUnit.NANOSECONDS
|
||||
|
||||
/**
|
||||
@@ -302,7 +302,7 @@ public inline class Duration internal constructor(internal val value: Double) :
|
||||
*
|
||||
* @sample samples.time.Durations.toIsoString
|
||||
*/
|
||||
@UseExperimental(ExperimentalStdlibApi::class)
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
public fun toIsoString(): String = buildString {
|
||||
if (isNegative()) append('-')
|
||||
append("PT")
|
||||
|
||||
Reference in New Issue
Block a user