diff --git a/js/js.libraries/src/core/annotationsJVM.kt b/js/js.libraries/src/core/annotationsJVM.kt index b22aa4b5b85..1569c19e849 100644 --- a/js/js.libraries/src/core/annotationsJVM.kt +++ b/js/js.libraries/src/core/annotationsJVM.kt @@ -19,4 +19,9 @@ package kotlin.jvm // is used in common generated code in stdlib @Target(AnnotationTarget.FUNCTION, AnnotationTarget.CONSTRUCTOR) @Retention(AnnotationRetention.SOURCE) -internal annotation class jvmOverloads +internal annotation class JvmOverloads + +@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.FILE) +@Retention(AnnotationRetention.RUNTIME) +@MustBeDocumented +internal annotation class JvmName(public val name: String) diff --git a/js/js.libraries/src/core/kotlin_special.kt b/js/js.libraries/src/core/kotlin_special.kt index 6cd1e4b6370..a52306b337d 100644 --- a/js/js.libraries/src/core/kotlin_special.kt +++ b/js/js.libraries/src/core/kotlin_special.kt @@ -78,7 +78,7 @@ public inline fun ShortArray.asList(): List { /** * Returns new array which is a copy of the original array. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun Array.copyOf(): Array { return (this: dynamic).slice(0) } @@ -86,7 +86,7 @@ public inline fun Array.copyOf(): Array { /** * Returns new array which is a copy of the original array. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun BooleanArray.copyOf(): BooleanArray { return (this: dynamic).slice(0) } @@ -94,7 +94,7 @@ public inline fun BooleanArray.copyOf(): BooleanArray { /** * Returns new array which is a copy of the original array. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun ByteArray.copyOf(): ByteArray { return (this: dynamic).slice(0) } @@ -102,7 +102,7 @@ public inline fun ByteArray.copyOf(): ByteArray { /** * Returns new array which is a copy of the original array. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun CharArray.copyOf(): CharArray { return (this: dynamic).slice(0) } @@ -110,7 +110,7 @@ public inline fun CharArray.copyOf(): CharArray { /** * Returns new array which is a copy of the original array. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun DoubleArray.copyOf(): DoubleArray { return (this: dynamic).slice(0) } @@ -118,7 +118,7 @@ public inline fun DoubleArray.copyOf(): DoubleArray { /** * Returns new array which is a copy of the original array. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun FloatArray.copyOf(): FloatArray { return (this: dynamic).slice(0) } @@ -126,7 +126,7 @@ public inline fun FloatArray.copyOf(): FloatArray { /** * Returns new array which is a copy of the original array. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun IntArray.copyOf(): IntArray { return (this: dynamic).slice(0) } @@ -134,7 +134,7 @@ public inline fun IntArray.copyOf(): IntArray { /** * Returns new array which is a copy of the original array. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun LongArray.copyOf(): LongArray { return (this: dynamic).slice(0) } @@ -142,7 +142,7 @@ public inline fun LongArray.copyOf(): LongArray { /** * Returns new array which is a copy of the original array. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun ShortArray.copyOf(): ShortArray { return (this: dynamic).slice(0) } @@ -213,7 +213,7 @@ public fun Array.copyOf(newSize: Int): Array { /** * Returns new array which is a copy of range of original array. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun Array.copyOfRange(fromIndex: Int, toIndex: Int): Array { return (this: dynamic).slice(fromIndex, toIndex) } @@ -221,7 +221,7 @@ public inline fun Array.copyOfRange(fromIndex: Int, toIndex: Int): Ar /** * Returns new array which is a copy of range of original array. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun BooleanArray.copyOfRange(fromIndex: Int, toIndex: Int): BooleanArray { return (this: dynamic).slice(fromIndex, toIndex) } @@ -229,7 +229,7 @@ public inline fun BooleanArray.copyOfRange(fromIndex: Int, toIndex: Int): Boolea /** * Returns new array which is a copy of range of original array. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun ByteArray.copyOfRange(fromIndex: Int, toIndex: Int): ByteArray { return (this: dynamic).slice(fromIndex, toIndex) } @@ -237,7 +237,7 @@ public inline fun ByteArray.copyOfRange(fromIndex: Int, toIndex: Int): ByteArray /** * Returns new array which is a copy of range of original array. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun CharArray.copyOfRange(fromIndex: Int, toIndex: Int): CharArray { return (this: dynamic).slice(fromIndex, toIndex) } @@ -245,7 +245,7 @@ public inline fun CharArray.copyOfRange(fromIndex: Int, toIndex: Int): CharArray /** * Returns new array which is a copy of range of original array. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun DoubleArray.copyOfRange(fromIndex: Int, toIndex: Int): DoubleArray { return (this: dynamic).slice(fromIndex, toIndex) } @@ -253,7 +253,7 @@ public inline fun DoubleArray.copyOfRange(fromIndex: Int, toIndex: Int): DoubleA /** * Returns new array which is a copy of range of original array. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun FloatArray.copyOfRange(fromIndex: Int, toIndex: Int): FloatArray { return (this: dynamic).slice(fromIndex, toIndex) } @@ -261,7 +261,7 @@ public inline fun FloatArray.copyOfRange(fromIndex: Int, toIndex: Int): FloatArr /** * Returns new array which is a copy of range of original array. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun IntArray.copyOfRange(fromIndex: Int, toIndex: Int): IntArray { return (this: dynamic).slice(fromIndex, toIndex) } @@ -269,7 +269,7 @@ public inline fun IntArray.copyOfRange(fromIndex: Int, toIndex: Int): IntArray { /** * Returns new array which is a copy of range of original array. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun LongArray.copyOfRange(fromIndex: Int, toIndex: Int): LongArray { return (this: dynamic).slice(fromIndex, toIndex) } @@ -277,7 +277,7 @@ public inline fun LongArray.copyOfRange(fromIndex: Int, toIndex: Int): LongArray /** * Returns new array which is a copy of range of original array. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun ShortArray.copyOfRange(fromIndex: Int, toIndex: Int): ShortArray { return (this: dynamic).slice(fromIndex, toIndex) } @@ -285,7 +285,7 @@ public inline fun ShortArray.copyOfRange(fromIndex: Int, toIndex: Int): ShortArr /** * Returns an array containing all elements of the original array and then all elements of the given [array]. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun Array.plus(array: Array): Array { return (this: dynamic).concat(array) } @@ -293,7 +293,7 @@ public inline fun Array.plus(array: Array): Array { /** * Returns an array containing all elements of the original array and then all elements of the given [array]. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun BooleanArray.plus(array: BooleanArray): BooleanArray { return (this: dynamic).concat(array) } @@ -301,7 +301,7 @@ public inline fun BooleanArray.plus(array: BooleanArray): BooleanArray { /** * Returns an array containing all elements of the original array and then all elements of the given [array]. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun ByteArray.plus(array: ByteArray): ByteArray { return (this: dynamic).concat(array) } @@ -309,7 +309,7 @@ public inline fun ByteArray.plus(array: ByteArray): ByteArray { /** * Returns an array containing all elements of the original array and then all elements of the given [array]. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun CharArray.plus(array: CharArray): CharArray { return (this: dynamic).concat(array) } @@ -317,7 +317,7 @@ public inline fun CharArray.plus(array: CharArray): CharArray { /** * Returns an array containing all elements of the original array and then all elements of the given [array]. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun DoubleArray.plus(array: DoubleArray): DoubleArray { return (this: dynamic).concat(array) } @@ -325,7 +325,7 @@ public inline fun DoubleArray.plus(array: DoubleArray): DoubleArray { /** * Returns an array containing all elements of the original array and then all elements of the given [array]. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun FloatArray.plus(array: FloatArray): FloatArray { return (this: dynamic).concat(array) } @@ -333,7 +333,7 @@ public inline fun FloatArray.plus(array: FloatArray): FloatArray { /** * Returns an array containing all elements of the original array and then all elements of the given [array]. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun IntArray.plus(array: IntArray): IntArray { return (this: dynamic).concat(array) } @@ -341,7 +341,7 @@ public inline fun IntArray.plus(array: IntArray): IntArray { /** * Returns an array containing all elements of the original array and then all elements of the given [array]. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun LongArray.plus(array: LongArray): LongArray { return (this: dynamic).concat(array) } @@ -349,7 +349,7 @@ public inline fun LongArray.plus(array: LongArray): LongArray { /** * Returns an array containing all elements of the original array and then all elements of the given [array]. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun ShortArray.plus(array: ShortArray): ShortArray { return (this: dynamic).concat(array) } @@ -420,7 +420,7 @@ public fun ShortArray.plus(collection: Collection): ShortArray { /** * Returns an array containing all elements of the original array and then the given [element]. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun Array.plus(element: T): Array { return (this: dynamic).concat(arrayOf(element)) } @@ -428,7 +428,7 @@ public inline fun Array.plus(element: T): Array { /** * Returns an array containing all elements of the original array and then the given [element]. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun BooleanArray.plus(element: Boolean): BooleanArray { return (this: dynamic).concat(arrayOf(element)) } @@ -436,7 +436,7 @@ public inline fun BooleanArray.plus(element: Boolean): BooleanArray { /** * Returns an array containing all elements of the original array and then the given [element]. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun ByteArray.plus(element: Byte): ByteArray { return (this: dynamic).concat(arrayOf(element)) } @@ -444,7 +444,7 @@ public inline fun ByteArray.plus(element: Byte): ByteArray { /** * Returns an array containing all elements of the original array and then the given [element]. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun CharArray.plus(element: Char): CharArray { return (this: dynamic).concat(arrayOf(element)) } @@ -452,7 +452,7 @@ public inline fun CharArray.plus(element: Char): CharArray { /** * Returns an array containing all elements of the original array and then the given [element]. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun DoubleArray.plus(element: Double): DoubleArray { return (this: dynamic).concat(arrayOf(element)) } @@ -460,7 +460,7 @@ public inline fun DoubleArray.plus(element: Double): DoubleArray { /** * Returns an array containing all elements of the original array and then the given [element]. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun FloatArray.plus(element: Float): FloatArray { return (this: dynamic).concat(arrayOf(element)) } @@ -468,7 +468,7 @@ public inline fun FloatArray.plus(element: Float): FloatArray { /** * Returns an array containing all elements of the original array and then the given [element]. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun IntArray.plus(element: Int): IntArray { return (this: dynamic).concat(arrayOf(element)) } @@ -476,7 +476,7 @@ public inline fun IntArray.plus(element: Int): IntArray { /** * Returns an array containing all elements of the original array and then the given [element]. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun LongArray.plus(element: Long): LongArray { return (this: dynamic).concat(arrayOf(element)) } @@ -484,7 +484,7 @@ public inline fun LongArray.plus(element: Long): LongArray { /** * Returns an array containing all elements of the original array and then the given [element]. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun ShortArray.plus(element: Short): ShortArray { return (this: dynamic).concat(arrayOf(element)) } @@ -492,7 +492,7 @@ public inline fun ShortArray.plus(element: Short): ShortArray { /** * Sorts the array inplace. */ -library("primitiveArraySort") +@library("primitiveArraySort") public fun ByteArray.sort(): Unit { return noImpl } @@ -500,7 +500,7 @@ public fun ByteArray.sort(): Unit { /** * Sorts the array inplace. */ -library("primitiveArraySort") +@library("primitiveArraySort") public fun CharArray.sort(): Unit { return noImpl } @@ -508,7 +508,7 @@ public fun CharArray.sort(): Unit { /** * Sorts the array inplace. */ -library("primitiveArraySort") +@library("primitiveArraySort") public fun DoubleArray.sort(): Unit { return noImpl } @@ -516,7 +516,7 @@ public fun DoubleArray.sort(): Unit { /** * Sorts the array inplace. */ -library("primitiveArraySort") +@library("primitiveArraySort") public fun FloatArray.sort(): Unit { return noImpl } @@ -524,7 +524,7 @@ public fun FloatArray.sort(): Unit { /** * Sorts the array inplace. */ -library("primitiveArraySort") +@library("primitiveArraySort") public fun IntArray.sort(): Unit { return noImpl } @@ -532,7 +532,7 @@ public fun IntArray.sort(): Unit { /** * Sorts the array inplace. */ -library("primitiveArraySort") +@library("primitiveArraySort") public fun ShortArray.sort(): Unit { return noImpl } @@ -554,7 +554,7 @@ public fun LongArray.sort(): Unit { /** * Sorts the array inplace according to the order specified by the given [comparison] function. */ -native +@native public fun Array.sort(comparison: (T, T) -> Int): Unit { return noImpl } @@ -562,7 +562,7 @@ public fun Array.sort(comparison: (T, T) -> Int): Unit { /** * Sorts the array inplace according to the order specified by the given [comparison] function. */ -native +@native public fun ByteArray.sort(comparison: (Byte, Byte) -> Int): Unit { return noImpl } @@ -570,7 +570,7 @@ public fun ByteArray.sort(comparison: (Byte, Byte) -> Int): Unit { /** * Sorts the array inplace according to the order specified by the given [comparison] function. */ -native +@native public fun CharArray.sort(comparison: (Char, Char) -> Int): Unit { return noImpl } @@ -578,7 +578,7 @@ public fun CharArray.sort(comparison: (Char, Char) -> Int): Unit { /** * Sorts the array inplace according to the order specified by the given [comparison] function. */ -native +@native public fun DoubleArray.sort(comparison: (Double, Double) -> Int): Unit { return noImpl } @@ -586,7 +586,7 @@ public fun DoubleArray.sort(comparison: (Double, Double) -> Int): Unit { /** * Sorts the array inplace according to the order specified by the given [comparison] function. */ -native +@native public fun FloatArray.sort(comparison: (Float, Float) -> Int): Unit { return noImpl } @@ -594,7 +594,7 @@ public fun FloatArray.sort(comparison: (Float, Float) -> Int): Unit { /** * Sorts the array inplace according to the order specified by the given [comparison] function. */ -native +@native public fun IntArray.sort(comparison: (Int, Int) -> Int): Unit { return noImpl } @@ -602,7 +602,7 @@ public fun IntArray.sort(comparison: (Int, Int) -> Int): Unit { /** * Sorts the array inplace according to the order specified by the given [comparison] function. */ -native +@native public fun LongArray.sort(comparison: (Long, Long) -> Int): Unit { return noImpl } @@ -610,7 +610,7 @@ public fun LongArray.sort(comparison: (Long, Long) -> Int): Unit { /** * Sorts the array inplace according to the order specified by the given [comparison] function. */ -native +@native public fun ShortArray.sort(comparison: (Short, Short) -> Int): Unit { return noImpl } diff --git a/libraries/stdlib/src/generated/_Elements.kt b/libraries/stdlib/src/generated/_Elements.kt index 7e591419c02..207e07766f3 100644 --- a/libraries/stdlib/src/generated/_Elements.kt +++ b/libraries/stdlib/src/generated/_Elements.kt @@ -13,7 +13,7 @@ import java.util.Collections // TODO: it's temporary while we have java.util.Col /** * Returns 1st *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun Array.component1(): T { return get(0) } @@ -21,7 +21,7 @@ public inline fun Array.component1(): T { /** * Returns 1st *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun BooleanArray.component1(): Boolean { return get(0) } @@ -29,7 +29,7 @@ public inline fun BooleanArray.component1(): Boolean { /** * Returns 1st *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun ByteArray.component1(): Byte { return get(0) } @@ -37,7 +37,7 @@ public inline fun ByteArray.component1(): Byte { /** * Returns 1st *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun CharArray.component1(): Char { return get(0) } @@ -45,7 +45,7 @@ public inline fun CharArray.component1(): Char { /** * Returns 1st *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun DoubleArray.component1(): Double { return get(0) } @@ -53,7 +53,7 @@ public inline fun DoubleArray.component1(): Double { /** * Returns 1st *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun FloatArray.component1(): Float { return get(0) } @@ -61,7 +61,7 @@ public inline fun FloatArray.component1(): Float { /** * Returns 1st *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun IntArray.component1(): Int { return get(0) } @@ -69,7 +69,7 @@ public inline fun IntArray.component1(): Int { /** * Returns 1st *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun LongArray.component1(): Long { return get(0) } @@ -77,7 +77,7 @@ public inline fun LongArray.component1(): Long { /** * Returns 1st *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun ShortArray.component1(): Short { return get(0) } @@ -85,7 +85,7 @@ public inline fun ShortArray.component1(): Short { /** * Returns 1st *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun List.component1(): T { return get(0) } @@ -93,7 +93,7 @@ public inline fun List.component1(): T { /** * Returns 2nd *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun Array.component2(): T { return get(1) } @@ -101,7 +101,7 @@ public inline fun Array.component2(): T { /** * Returns 2nd *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun BooleanArray.component2(): Boolean { return get(1) } @@ -109,7 +109,7 @@ public inline fun BooleanArray.component2(): Boolean { /** * Returns 2nd *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun ByteArray.component2(): Byte { return get(1) } @@ -117,7 +117,7 @@ public inline fun ByteArray.component2(): Byte { /** * Returns 2nd *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun CharArray.component2(): Char { return get(1) } @@ -125,7 +125,7 @@ public inline fun CharArray.component2(): Char { /** * Returns 2nd *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun DoubleArray.component2(): Double { return get(1) } @@ -133,7 +133,7 @@ public inline fun DoubleArray.component2(): Double { /** * Returns 2nd *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun FloatArray.component2(): Float { return get(1) } @@ -141,7 +141,7 @@ public inline fun FloatArray.component2(): Float { /** * Returns 2nd *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun IntArray.component2(): Int { return get(1) } @@ -149,7 +149,7 @@ public inline fun IntArray.component2(): Int { /** * Returns 2nd *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun LongArray.component2(): Long { return get(1) } @@ -157,7 +157,7 @@ public inline fun LongArray.component2(): Long { /** * Returns 2nd *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun ShortArray.component2(): Short { return get(1) } @@ -165,7 +165,7 @@ public inline fun ShortArray.component2(): Short { /** * Returns 2nd *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun List.component2(): T { return get(1) } @@ -173,7 +173,7 @@ public inline fun List.component2(): T { /** * Returns 3rd *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun Array.component3(): T { return get(2) } @@ -181,7 +181,7 @@ public inline fun Array.component3(): T { /** * Returns 3rd *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun BooleanArray.component3(): Boolean { return get(2) } @@ -189,7 +189,7 @@ public inline fun BooleanArray.component3(): Boolean { /** * Returns 3rd *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun ByteArray.component3(): Byte { return get(2) } @@ -197,7 +197,7 @@ public inline fun ByteArray.component3(): Byte { /** * Returns 3rd *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun CharArray.component3(): Char { return get(2) } @@ -205,7 +205,7 @@ public inline fun CharArray.component3(): Char { /** * Returns 3rd *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun DoubleArray.component3(): Double { return get(2) } @@ -213,7 +213,7 @@ public inline fun DoubleArray.component3(): Double { /** * Returns 3rd *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun FloatArray.component3(): Float { return get(2) } @@ -221,7 +221,7 @@ public inline fun FloatArray.component3(): Float { /** * Returns 3rd *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun IntArray.component3(): Int { return get(2) } @@ -229,7 +229,7 @@ public inline fun IntArray.component3(): Int { /** * Returns 3rd *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun LongArray.component3(): Long { return get(2) } @@ -237,7 +237,7 @@ public inline fun LongArray.component3(): Long { /** * Returns 3rd *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun ShortArray.component3(): Short { return get(2) } @@ -245,7 +245,7 @@ public inline fun ShortArray.component3(): Short { /** * Returns 3rd *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun List.component3(): T { return get(2) } @@ -253,7 +253,7 @@ public inline fun List.component3(): T { /** * Returns 4th *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun Array.component4(): T { return get(3) } @@ -261,7 +261,7 @@ public inline fun Array.component4(): T { /** * Returns 4th *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun BooleanArray.component4(): Boolean { return get(3) } @@ -269,7 +269,7 @@ public inline fun BooleanArray.component4(): Boolean { /** * Returns 4th *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun ByteArray.component4(): Byte { return get(3) } @@ -277,7 +277,7 @@ public inline fun ByteArray.component4(): Byte { /** * Returns 4th *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun CharArray.component4(): Char { return get(3) } @@ -285,7 +285,7 @@ public inline fun CharArray.component4(): Char { /** * Returns 4th *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun DoubleArray.component4(): Double { return get(3) } @@ -293,7 +293,7 @@ public inline fun DoubleArray.component4(): Double { /** * Returns 4th *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun FloatArray.component4(): Float { return get(3) } @@ -301,7 +301,7 @@ public inline fun FloatArray.component4(): Float { /** * Returns 4th *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun IntArray.component4(): Int { return get(3) } @@ -309,7 +309,7 @@ public inline fun IntArray.component4(): Int { /** * Returns 4th *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun LongArray.component4(): Long { return get(3) } @@ -317,7 +317,7 @@ public inline fun LongArray.component4(): Long { /** * Returns 4th *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun ShortArray.component4(): Short { return get(3) } @@ -325,7 +325,7 @@ public inline fun ShortArray.component4(): Short { /** * Returns 4th *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun List.component4(): T { return get(3) } @@ -333,7 +333,7 @@ public inline fun List.component4(): T { /** * Returns 5th *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun Array.component5(): T { return get(4) } @@ -341,7 +341,7 @@ public inline fun Array.component5(): T { /** * Returns 5th *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun BooleanArray.component5(): Boolean { return get(4) } @@ -349,7 +349,7 @@ public inline fun BooleanArray.component5(): Boolean { /** * Returns 5th *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun ByteArray.component5(): Byte { return get(4) } @@ -357,7 +357,7 @@ public inline fun ByteArray.component5(): Byte { /** * Returns 5th *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun CharArray.component5(): Char { return get(4) } @@ -365,7 +365,7 @@ public inline fun CharArray.component5(): Char { /** * Returns 5th *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun DoubleArray.component5(): Double { return get(4) } @@ -373,7 +373,7 @@ public inline fun DoubleArray.component5(): Double { /** * Returns 5th *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun FloatArray.component5(): Float { return get(4) } @@ -381,7 +381,7 @@ public inline fun FloatArray.component5(): Float { /** * Returns 5th *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun IntArray.component5(): Int { return get(4) } @@ -389,7 +389,7 @@ public inline fun IntArray.component5(): Int { /** * Returns 5th *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun LongArray.component5(): Long { return get(4) } @@ -397,7 +397,7 @@ public inline fun LongArray.component5(): Long { /** * Returns 5th *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun ShortArray.component5(): Short { return get(4) } @@ -405,7 +405,7 @@ public inline fun ShortArray.component5(): Short { /** * Returns 5th *element* from the collection. */ -suppress("NOTHING_TO_INLINE") +@Suppress("NOTHING_TO_INLINE") public inline fun List.component5(): T { return get(4) } diff --git a/libraries/stdlib/src/generated/_Mapping.kt b/libraries/stdlib/src/generated/_Mapping.kt index 61ebace358f..a7a2395cdac 100644 --- a/libraries/stdlib/src/generated/_Mapping.kt +++ b/libraries/stdlib/src/generated/_Mapping.kt @@ -1067,7 +1067,7 @@ public fun String.withIndex(): Iterable> { /** * Returns a list containing pairs of each element of the original collection and their index. */ -deprecated("Use withIndex() instead.") +@Deprecated("Use withIndex() instead.") public fun Array.withIndices(): List> { var index = 0 return mapTo(ArrayList>(), { index++ to it }) @@ -1076,7 +1076,7 @@ public fun Array.withIndices(): List> { /** * Returns a list containing pairs of each element of the original collection and their index. */ -deprecated("Use withIndex() instead.") +@Deprecated("Use withIndex() instead.") public fun BooleanArray.withIndices(): List> { var index = 0 return mapTo(ArrayList>(), { index++ to it }) @@ -1085,7 +1085,7 @@ public fun BooleanArray.withIndices(): List> { /** * Returns a list containing pairs of each element of the original collection and their index. */ -deprecated("Use withIndex() instead.") +@Deprecated("Use withIndex() instead.") public fun ByteArray.withIndices(): List> { var index = 0 return mapTo(ArrayList>(), { index++ to it }) @@ -1094,7 +1094,7 @@ public fun ByteArray.withIndices(): List> { /** * Returns a list containing pairs of each element of the original collection and their index. */ -deprecated("Use withIndex() instead.") +@Deprecated("Use withIndex() instead.") public fun CharArray.withIndices(): List> { var index = 0 return mapTo(ArrayList>(), { index++ to it }) @@ -1103,7 +1103,7 @@ public fun CharArray.withIndices(): List> { /** * Returns a list containing pairs of each element of the original collection and their index. */ -deprecated("Use withIndex() instead.") +@Deprecated("Use withIndex() instead.") public fun DoubleArray.withIndices(): List> { var index = 0 return mapTo(ArrayList>(), { index++ to it }) @@ -1112,7 +1112,7 @@ public fun DoubleArray.withIndices(): List> { /** * Returns a list containing pairs of each element of the original collection and their index. */ -deprecated("Use withIndex() instead.") +@Deprecated("Use withIndex() instead.") public fun FloatArray.withIndices(): List> { var index = 0 return mapTo(ArrayList>(), { index++ to it }) @@ -1121,7 +1121,7 @@ public fun FloatArray.withIndices(): List> { /** * Returns a list containing pairs of each element of the original collection and their index. */ -deprecated("Use withIndex() instead.") +@Deprecated("Use withIndex() instead.") public fun IntArray.withIndices(): List> { var index = 0 return mapTo(ArrayList>(), { index++ to it }) @@ -1130,7 +1130,7 @@ public fun IntArray.withIndices(): List> { /** * Returns a list containing pairs of each element of the original collection and their index. */ -deprecated("Use withIndex() instead.") +@Deprecated("Use withIndex() instead.") public fun LongArray.withIndices(): List> { var index = 0 return mapTo(ArrayList>(), { index++ to it }) @@ -1139,7 +1139,7 @@ public fun LongArray.withIndices(): List> { /** * Returns a list containing pairs of each element of the original collection and their index. */ -deprecated("Use withIndex() instead.") +@Deprecated("Use withIndex() instead.") public fun ShortArray.withIndices(): List> { var index = 0 return mapTo(ArrayList>(), { index++ to it }) @@ -1148,7 +1148,7 @@ public fun ShortArray.withIndices(): List> { /** * Returns a list containing pairs of each element of the original collection and their index. */ -deprecated("Use withIndex() instead.") +@Deprecated("Use withIndex() instead.") public fun Iterable.withIndices(): List> { var index = 0 return mapTo(ArrayList>(), { index++ to it }) @@ -1157,7 +1157,7 @@ public fun Iterable.withIndices(): List> { /** * Returns a sequence containing pairs of each element of the original collection and their index. */ -deprecated("Use withIndex() instead.") +@Deprecated("Use withIndex() instead.") public fun Sequence.withIndices(): Sequence> { var index = 0 return TransformingSequence(this, { index++ to it }) @@ -1166,7 +1166,7 @@ public fun Sequence.withIndices(): Sequence> { /** * Returns a list containing pairs of each element of the original collection and their index. */ -deprecated("Use withIndex() instead.") +@Deprecated("Use withIndex() instead.") public fun String.withIndices(): List> { var index = 0 return mapTo(ArrayList>(), { index++ to it }) diff --git a/libraries/stdlib/src/generated/_Numeric.kt b/libraries/stdlib/src/generated/_Numeric.kt index dee1396fae6..ccc2447f7b9 100644 --- a/libraries/stdlib/src/generated/_Numeric.kt +++ b/libraries/stdlib/src/generated/_Numeric.kt @@ -13,7 +13,7 @@ import java.util.Collections // TODO: it's temporary while we have java.util.Col /** * Returns an average value of elements in the collection. */ -platformName("averageOfByte") +@kotlin.jvm.JvmName("averageOfByte") public fun Array.average(): Double { val iterator = iterator() var sum: Double = 0.0 @@ -28,7 +28,7 @@ public fun Array.average(): Double { /** * Returns an average value of elements in the collection. */ -platformName("averageOfDouble") +@kotlin.jvm.JvmName("averageOfDouble") public fun Array.average(): Double { val iterator = iterator() var sum: Double = 0.0 @@ -43,7 +43,7 @@ public fun Array.average(): Double { /** * Returns an average value of elements in the collection. */ -platformName("averageOfFloat") +@kotlin.jvm.JvmName("averageOfFloat") public fun Array.average(): Double { val iterator = iterator() var sum: Double = 0.0 @@ -58,7 +58,7 @@ public fun Array.average(): Double { /** * Returns an average value of elements in the collection. */ -platformName("averageOfInt") +@kotlin.jvm.JvmName("averageOfInt") public fun Array.average(): Double { val iterator = iterator() var sum: Double = 0.0 @@ -73,7 +73,7 @@ public fun Array.average(): Double { /** * Returns an average value of elements in the collection. */ -platformName("averageOfLong") +@kotlin.jvm.JvmName("averageOfLong") public fun Array.average(): Double { val iterator = iterator() var sum: Double = 0.0 @@ -88,7 +88,7 @@ public fun Array.average(): Double { /** * Returns an average value of elements in the collection. */ -platformName("averageOfShort") +@kotlin.jvm.JvmName("averageOfShort") public fun Array.average(): Double { val iterator = iterator() var sum: Double = 0.0 @@ -187,7 +187,7 @@ public fun ShortArray.average(): Double { /** * Returns an average value of elements in the collection. */ -platformName("averageOfByte") +@kotlin.jvm.JvmName("averageOfByte") public fun Iterable.average(): Double { val iterator = iterator() var sum: Double = 0.0 @@ -202,7 +202,7 @@ public fun Iterable.average(): Double { /** * Returns an average value of elements in the collection. */ -platformName("averageOfDouble") +@kotlin.jvm.JvmName("averageOfDouble") public fun Iterable.average(): Double { val iterator = iterator() var sum: Double = 0.0 @@ -217,7 +217,7 @@ public fun Iterable.average(): Double { /** * Returns an average value of elements in the collection. */ -platformName("averageOfFloat") +@kotlin.jvm.JvmName("averageOfFloat") public fun Iterable.average(): Double { val iterator = iterator() var sum: Double = 0.0 @@ -232,7 +232,7 @@ public fun Iterable.average(): Double { /** * Returns an average value of elements in the collection. */ -platformName("averageOfInt") +@kotlin.jvm.JvmName("averageOfInt") public fun Iterable.average(): Double { val iterator = iterator() var sum: Double = 0.0 @@ -247,7 +247,7 @@ public fun Iterable.average(): Double { /** * Returns an average value of elements in the collection. */ -platformName("averageOfLong") +@kotlin.jvm.JvmName("averageOfLong") public fun Iterable.average(): Double { val iterator = iterator() var sum: Double = 0.0 @@ -262,7 +262,7 @@ public fun Iterable.average(): Double { /** * Returns an average value of elements in the collection. */ -platformName("averageOfShort") +@kotlin.jvm.JvmName("averageOfShort") public fun Iterable.average(): Double { val iterator = iterator() var sum: Double = 0.0 @@ -277,7 +277,7 @@ public fun Iterable.average(): Double { /** * Returns an average value of elements in the collection. */ -platformName("averageOfByte") +@kotlin.jvm.JvmName("averageOfByte") public fun Sequence.average(): Double { val iterator = iterator() var sum: Double = 0.0 @@ -292,7 +292,7 @@ public fun Sequence.average(): Double { /** * Returns an average value of elements in the collection. */ -platformName("averageOfDouble") +@kotlin.jvm.JvmName("averageOfDouble") public fun Sequence.average(): Double { val iterator = iterator() var sum: Double = 0.0 @@ -307,7 +307,7 @@ public fun Sequence.average(): Double { /** * Returns an average value of elements in the collection. */ -platformName("averageOfFloat") +@kotlin.jvm.JvmName("averageOfFloat") public fun Sequence.average(): Double { val iterator = iterator() var sum: Double = 0.0 @@ -322,7 +322,7 @@ public fun Sequence.average(): Double { /** * Returns an average value of elements in the collection. */ -platformName("averageOfInt") +@kotlin.jvm.JvmName("averageOfInt") public fun Sequence.average(): Double { val iterator = iterator() var sum: Double = 0.0 @@ -337,7 +337,7 @@ public fun Sequence.average(): Double { /** * Returns an average value of elements in the collection. */ -platformName("averageOfLong") +@kotlin.jvm.JvmName("averageOfLong") public fun Sequence.average(): Double { val iterator = iterator() var sum: Double = 0.0 @@ -352,7 +352,7 @@ public fun Sequence.average(): Double { /** * Returns an average value of elements in the collection. */ -platformName("averageOfShort") +@kotlin.jvm.JvmName("averageOfShort") public fun Sequence.average(): Double { val iterator = iterator() var sum: Double = 0.0 @@ -367,7 +367,7 @@ public fun Sequence.average(): Double { /** * Returns the sum of all elements in the collection. */ -platformName("sumOfByte") +@kotlin.jvm.JvmName("sumOfByte") public fun Array.sum(): Int { val iterator = iterator() var sum: Int = 0 @@ -380,7 +380,7 @@ public fun Array.sum(): Int { /** * Returns the sum of all elements in the collection. */ -platformName("sumOfDouble") +@kotlin.jvm.JvmName("sumOfDouble") public fun Array.sum(): Double { val iterator = iterator() var sum: Double = 0.0 @@ -393,7 +393,7 @@ public fun Array.sum(): Double { /** * Returns the sum of all elements in the collection. */ -platformName("sumOfFloat") +@kotlin.jvm.JvmName("sumOfFloat") public fun Array.sum(): Float { val iterator = iterator() var sum: Float = 0.0f @@ -406,7 +406,7 @@ public fun Array.sum(): Float { /** * Returns the sum of all elements in the collection. */ -platformName("sumOfInt") +@kotlin.jvm.JvmName("sumOfInt") public fun Array.sum(): Int { val iterator = iterator() var sum: Int = 0 @@ -419,7 +419,7 @@ public fun Array.sum(): Int { /** * Returns the sum of all elements in the collection. */ -platformName("sumOfLong") +@kotlin.jvm.JvmName("sumOfLong") public fun Array.sum(): Long { val iterator = iterator() var sum: Long = 0L @@ -432,7 +432,7 @@ public fun Array.sum(): Long { /** * Returns the sum of all elements in the collection. */ -platformName("sumOfShort") +@kotlin.jvm.JvmName("sumOfShort") public fun Array.sum(): Int { val iterator = iterator() var sum: Int = 0 @@ -517,7 +517,7 @@ public fun ShortArray.sum(): Int { /** * Returns the sum of all elements in the collection. */ -platformName("sumOfByte") +@kotlin.jvm.JvmName("sumOfByte") public fun Iterable.sum(): Int { val iterator = iterator() var sum: Int = 0 @@ -530,7 +530,7 @@ public fun Iterable.sum(): Int { /** * Returns the sum of all elements in the collection. */ -platformName("sumOfDouble") +@kotlin.jvm.JvmName("sumOfDouble") public fun Iterable.sum(): Double { val iterator = iterator() var sum: Double = 0.0 @@ -543,7 +543,7 @@ public fun Iterable.sum(): Double { /** * Returns the sum of all elements in the collection. */ -platformName("sumOfFloat") +@kotlin.jvm.JvmName("sumOfFloat") public fun Iterable.sum(): Float { val iterator = iterator() var sum: Float = 0.0f @@ -556,7 +556,7 @@ public fun Iterable.sum(): Float { /** * Returns the sum of all elements in the collection. */ -platformName("sumOfInt") +@kotlin.jvm.JvmName("sumOfInt") public fun Iterable.sum(): Int { val iterator = iterator() var sum: Int = 0 @@ -569,7 +569,7 @@ public fun Iterable.sum(): Int { /** * Returns the sum of all elements in the collection. */ -platformName("sumOfLong") +@kotlin.jvm.JvmName("sumOfLong") public fun Iterable.sum(): Long { val iterator = iterator() var sum: Long = 0L @@ -582,7 +582,7 @@ public fun Iterable.sum(): Long { /** * Returns the sum of all elements in the collection. */ -platformName("sumOfShort") +@kotlin.jvm.JvmName("sumOfShort") public fun Iterable.sum(): Int { val iterator = iterator() var sum: Int = 0 @@ -595,7 +595,7 @@ public fun Iterable.sum(): Int { /** * Returns the sum of all elements in the collection. */ -platformName("sumOfByte") +@kotlin.jvm.JvmName("sumOfByte") public fun Sequence.sum(): Int { val iterator = iterator() var sum: Int = 0 @@ -608,7 +608,7 @@ public fun Sequence.sum(): Int { /** * Returns the sum of all elements in the collection. */ -platformName("sumOfDouble") +@kotlin.jvm.JvmName("sumOfDouble") public fun Sequence.sum(): Double { val iterator = iterator() var sum: Double = 0.0 @@ -621,7 +621,7 @@ public fun Sequence.sum(): Double { /** * Returns the sum of all elements in the collection. */ -platformName("sumOfFloat") +@kotlin.jvm.JvmName("sumOfFloat") public fun Sequence.sum(): Float { val iterator = iterator() var sum: Float = 0.0f @@ -634,7 +634,7 @@ public fun Sequence.sum(): Float { /** * Returns the sum of all elements in the collection. */ -platformName("sumOfInt") +@kotlin.jvm.JvmName("sumOfInt") public fun Sequence.sum(): Int { val iterator = iterator() var sum: Int = 0 @@ -647,7 +647,7 @@ public fun Sequence.sum(): Int { /** * Returns the sum of all elements in the collection. */ -platformName("sumOfLong") +@kotlin.jvm.JvmName("sumOfLong") public fun Sequence.sum(): Long { val iterator = iterator() var sum: Long = 0L @@ -660,7 +660,7 @@ public fun Sequence.sum(): Long { /** * Returns the sum of all elements in the collection. */ -platformName("sumOfShort") +@kotlin.jvm.JvmName("sumOfShort") public fun Sequence.sum(): Int { val iterator = iterator() var sum: Int = 0 diff --git a/libraries/stdlib/src/generated/_Ordering.kt b/libraries/stdlib/src/generated/_Ordering.kt index cd1e0fd137d..88ffdb4555c 100644 --- a/libraries/stdlib/src/generated/_Ordering.kt +++ b/libraries/stdlib/src/generated/_Ordering.kt @@ -13,7 +13,7 @@ import java.util.Collections // TODO: it's temporary while we have java.util.Col /** * Returns a list with elements in reversed order. */ -deprecated("reverse will change its behavior soon. Use reversed() instead.", ReplaceWith("reversed()")) +@Deprecated("reverse will change its behavior soon. Use reversed() instead.", ReplaceWith("reversed()")) public fun Array.reverse(): List { return reversed() } @@ -21,7 +21,7 @@ public fun Array.reverse(): List { /** * Returns a list with elements in reversed order. */ -deprecated("reverse will change its behavior soon. Use reversed() instead.", ReplaceWith("reversed()")) +@Deprecated("reverse will change its behavior soon. Use reversed() instead.", ReplaceWith("reversed()")) public fun BooleanArray.reverse(): List { return reversed() } @@ -29,7 +29,7 @@ public fun BooleanArray.reverse(): List { /** * Returns a list with elements in reversed order. */ -deprecated("reverse will change its behavior soon. Use reversed() instead.", ReplaceWith("reversed()")) +@Deprecated("reverse will change its behavior soon. Use reversed() instead.", ReplaceWith("reversed()")) public fun ByteArray.reverse(): List { return reversed() } @@ -37,7 +37,7 @@ public fun ByteArray.reverse(): List { /** * Returns a list with elements in reversed order. */ -deprecated("reverse will change its behavior soon. Use reversed() instead.", ReplaceWith("reversed()")) +@Deprecated("reverse will change its behavior soon. Use reversed() instead.", ReplaceWith("reversed()")) public fun CharArray.reverse(): List { return reversed() } @@ -45,7 +45,7 @@ public fun CharArray.reverse(): List { /** * Returns a list with elements in reversed order. */ -deprecated("reverse will change its behavior soon. Use reversed() instead.", ReplaceWith("reversed()")) +@Deprecated("reverse will change its behavior soon. Use reversed() instead.", ReplaceWith("reversed()")) public fun DoubleArray.reverse(): List { return reversed() } @@ -53,7 +53,7 @@ public fun DoubleArray.reverse(): List { /** * Returns a list with elements in reversed order. */ -deprecated("reverse will change its behavior soon. Use reversed() instead.", ReplaceWith("reversed()")) +@Deprecated("reverse will change its behavior soon. Use reversed() instead.", ReplaceWith("reversed()")) public fun FloatArray.reverse(): List { return reversed() } @@ -61,7 +61,7 @@ public fun FloatArray.reverse(): List { /** * Returns a list with elements in reversed order. */ -deprecated("reverse will change its behavior soon. Use reversed() instead.", ReplaceWith("reversed()")) +@Deprecated("reverse will change its behavior soon. Use reversed() instead.", ReplaceWith("reversed()")) public fun IntArray.reverse(): List { return reversed() } @@ -69,7 +69,7 @@ public fun IntArray.reverse(): List { /** * Returns a list with elements in reversed order. */ -deprecated("reverse will change its behavior soon. Use reversed() instead.", ReplaceWith("reversed()")) +@Deprecated("reverse will change its behavior soon. Use reversed() instead.", ReplaceWith("reversed()")) public fun LongArray.reverse(): List { return reversed() } @@ -77,7 +77,7 @@ public fun LongArray.reverse(): List { /** * Returns a list with elements in reversed order. */ -deprecated("reverse will change its behavior soon. Use reversed() instead.", ReplaceWith("reversed()")) +@Deprecated("reverse will change its behavior soon. Use reversed() instead.", ReplaceWith("reversed()")) public fun ShortArray.reverse(): List { return reversed() } @@ -85,7 +85,7 @@ public fun ShortArray.reverse(): List { /** * Returns a list with elements in reversed order. */ -deprecated("reverse will change its behavior soon. Use reversed() instead.", ReplaceWith("reversed()")) +@Deprecated("reverse will change its behavior soon. Use reversed() instead.", ReplaceWith("reversed()")) public fun Iterable.reverse(): List { return reversed() } @@ -93,7 +93,7 @@ public fun Iterable.reverse(): List { /** * Returns a list with elements in reversed order. */ -deprecated("reverse will change its behavior soon. Use reversed() instead.", ReplaceWith("reversed()")) +@Deprecated("reverse will change its behavior soon. Use reversed() instead.", ReplaceWith("reversed()")) public fun String.reverse(): String { return reversed() } @@ -316,7 +316,7 @@ public fun ShortArray.reversedArray(): ShortArray { /** * Returns a sorted list of all elements. */ -deprecated("This method may change its behavior soon. Use sorted() instead.", ReplaceWith("sorted()")) +@Deprecated("This method may change its behavior soon. Use sorted() instead.", ReplaceWith("sorted()")) public fun > Iterable.sort(): List { val sortedList = toArrayList() java.util.Collections.sort(sortedList) @@ -326,7 +326,7 @@ public fun > Iterable.sort(): List { /** * Returns a list of all elements, sorted by the specified [comparator]. */ -deprecated("This method may change its behavior soon. Use sortedWith() instead.", ReplaceWith("sortedWith(comparator)")) +@Deprecated("This method may change its behavior soon. Use sortedWith() instead.", ReplaceWith("sortedWith(comparator)")) public fun Array.sortBy(comparator: Comparator): List { val sortedList = toArrayList() java.util.Collections.sort(sortedList, comparator) @@ -336,7 +336,7 @@ public fun Array.sortBy(comparator: Comparator): List { /** * Returns a list of all elements, sorted by the specified [comparator]. */ -deprecated("This method may change its behavior soon. Use sortedWith() instead.", ReplaceWith("sortedWith(comparator)")) +@Deprecated("This method may change its behavior soon. Use sortedWith() instead.", ReplaceWith("sortedWith(comparator)")) public fun Iterable.sortBy(comparator: Comparator): List { val sortedList = toArrayList() java.util.Collections.sort(sortedList, comparator) @@ -346,8 +346,8 @@ public fun Iterable.sortBy(comparator: Comparator): List { /** * Returns a sorted list of all elements, ordered by results of specified [order] function. */ -deprecated("This method may change its behavior soon. Use sortedBy() instead.", ReplaceWith("sortedBy(order)")) -public inline fun > Array.sortBy(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) order: (T) -> R): List { +@Deprecated("This method may change its behavior soon. Use sortedBy() instead.", ReplaceWith("sortedBy(order)")) +public inline fun > Array.sortBy(crossinline order: (T) -> R): List { val sortedList = toArrayList() val sortBy: Comparator = compareBy(order) java.util.Collections.sort(sortedList, sortBy) @@ -357,8 +357,8 @@ public inline fun > Array.sortBy(inlineOptions(Inlin /** * Returns a sorted list of all elements, ordered by results of specified [order] function. */ -deprecated("This method may change its behavior soon. Use sortedBy() instead.", ReplaceWith("sortedBy(order)")) -public inline fun > Iterable.sortBy(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) order: (T) -> R): List { +@Deprecated("This method may change its behavior soon. Use sortedBy() instead.", ReplaceWith("sortedBy(order)")) +public inline fun > Iterable.sortBy(crossinline order: (T) -> R): List { val sortedList = toArrayList() val sortBy: Comparator = compareBy(order) java.util.Collections.sort(sortedList, sortBy) @@ -368,7 +368,7 @@ public inline fun > Iterable.sortBy(inlineOptions(Inline /** * Returns a sorted list of all elements, in descending order. */ -deprecated("This method may change its behavior soon. Use sortedDescending() instead.", ReplaceWith("sortedDescending()")) +@Deprecated("This method may change its behavior soon. Use sortedDescending() instead.", ReplaceWith("sortedDescending()")) public fun > Iterable.sortDescending(): List { val sortedList = toArrayList() java.util.Collections.sort(sortedList, comparator { x, y -> y.compareTo(x) }) @@ -378,8 +378,8 @@ public fun > Iterable.sortDescending(): List { /** * Returns a sorted list of all elements, in descending order by results of specified [order] function. */ -deprecated("This method may change its behavior soon. Use sortedByDescending() instead.", ReplaceWith("sortedByDescending(order)")) -public inline fun > Array.sortDescendingBy(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) order: (T) -> R): List { +@Deprecated("This method may change its behavior soon. Use sortedByDescending() instead.", ReplaceWith("sortedByDescending(order)")) +public inline fun > Array.sortDescendingBy(crossinline order: (T) -> R): List { val sortedList = toArrayList() val sortBy: Comparator = compareByDescending(order) java.util.Collections.sort(sortedList, sortBy) @@ -389,8 +389,8 @@ public inline fun > Array.sortDescendingBy(inlineOpt /** * Returns a sorted list of all elements, in descending order by results of specified [order] function. */ -deprecated("This method may change its behavior soon. Use sortedByDescending() instead.", ReplaceWith("sortedByDescending(order)")) -public inline fun > Iterable.sortDescendingBy(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) order: (T) -> R): List { +@Deprecated("This method may change its behavior soon. Use sortedByDescending() instead.", ReplaceWith("sortedByDescending(order)")) +public inline fun > Iterable.sortDescendingBy(crossinline order: (T) -> R): List { val sortedList = toArrayList() val sortBy: Comparator = compareByDescending(order) java.util.Collections.sort(sortedList, sortBy) @@ -638,154 +638,154 @@ public fun > A.sortedArrayWith(comparator: Comparator): /** * Returns a list of all elements sorted according to natural sort order of the value returned by specified [selector] function. */ -public inline fun > Array.sortedBy(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) selector: (T) -> R?): List { +public inline fun > Array.sortedBy(crossinline selector: (T) -> R?): List { return sortedWith(compareBy(selector)) } /** * Returns a list of all elements sorted according to natural sort order of the value returned by specified [selector] function. */ -public inline fun > BooleanArray.sortedBy(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) selector: (Boolean) -> R?): List { +public inline fun > BooleanArray.sortedBy(crossinline selector: (Boolean) -> R?): List { return sortedWith(compareBy(selector)) } /** * Returns a list of all elements sorted according to natural sort order of the value returned by specified [selector] function. */ -public inline fun > ByteArray.sortedBy(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) selector: (Byte) -> R?): List { +public inline fun > ByteArray.sortedBy(crossinline selector: (Byte) -> R?): List { return sortedWith(compareBy(selector)) } /** * Returns a list of all elements sorted according to natural sort order of the value returned by specified [selector] function. */ -public inline fun > CharArray.sortedBy(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) selector: (Char) -> R?): List { +public inline fun > CharArray.sortedBy(crossinline selector: (Char) -> R?): List { return sortedWith(compareBy(selector)) } /** * Returns a list of all elements sorted according to natural sort order of the value returned by specified [selector] function. */ -public inline fun > DoubleArray.sortedBy(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) selector: (Double) -> R?): List { +public inline fun > DoubleArray.sortedBy(crossinline selector: (Double) -> R?): List { return sortedWith(compareBy(selector)) } /** * Returns a list of all elements sorted according to natural sort order of the value returned by specified [selector] function. */ -public inline fun > FloatArray.sortedBy(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) selector: (Float) -> R?): List { +public inline fun > FloatArray.sortedBy(crossinline selector: (Float) -> R?): List { return sortedWith(compareBy(selector)) } /** * Returns a list of all elements sorted according to natural sort order of the value returned by specified [selector] function. */ -public inline fun > IntArray.sortedBy(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) selector: (Int) -> R?): List { +public inline fun > IntArray.sortedBy(crossinline selector: (Int) -> R?): List { return sortedWith(compareBy(selector)) } /** * Returns a list of all elements sorted according to natural sort order of the value returned by specified [selector] function. */ -public inline fun > LongArray.sortedBy(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) selector: (Long) -> R?): List { +public inline fun > LongArray.sortedBy(crossinline selector: (Long) -> R?): List { return sortedWith(compareBy(selector)) } /** * Returns a list of all elements sorted according to natural sort order of the value returned by specified [selector] function. */ -public inline fun > ShortArray.sortedBy(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) selector: (Short) -> R?): List { +public inline fun > ShortArray.sortedBy(crossinline selector: (Short) -> R?): List { return sortedWith(compareBy(selector)) } /** * Returns a list of all elements sorted according to natural sort order of the value returned by specified [selector] function. */ -public inline fun > Iterable.sortedBy(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) selector: (T) -> R?): List { +public inline fun > Iterable.sortedBy(crossinline selector: (T) -> R?): List { return sortedWith(compareBy(selector)) } /** * Returns a sequence that yields elements of this sequence sorted according to natural sort order of the value returned by specified [selector] function. */ -public inline fun > Sequence.sortedBy(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) selector: (T) -> R?): Sequence { +public inline fun > Sequence.sortedBy(crossinline selector: (T) -> R?): Sequence { return sortedWith(compareBy(selector)) } /** * Returns a list of all elements sorted descending according to natural sort order of the value returned by specified [selector] function. */ -public inline fun > Array.sortedByDescending(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) selector: (T) -> R?): List { +public inline fun > Array.sortedByDescending(crossinline selector: (T) -> R?): List { return sortedWith(compareByDescending(selector)) } /** * Returns a list of all elements sorted descending according to natural sort order of the value returned by specified [selector] function. */ -public inline fun > BooleanArray.sortedByDescending(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) selector: (Boolean) -> R?): List { +public inline fun > BooleanArray.sortedByDescending(crossinline selector: (Boolean) -> R?): List { return sortedWith(compareByDescending(selector)) } /** * Returns a list of all elements sorted descending according to natural sort order of the value returned by specified [selector] function. */ -public inline fun > ByteArray.sortedByDescending(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) selector: (Byte) -> R?): List { +public inline fun > ByteArray.sortedByDescending(crossinline selector: (Byte) -> R?): List { return sortedWith(compareByDescending(selector)) } /** * Returns a list of all elements sorted descending according to natural sort order of the value returned by specified [selector] function. */ -public inline fun > CharArray.sortedByDescending(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) selector: (Char) -> R?): List { +public inline fun > CharArray.sortedByDescending(crossinline selector: (Char) -> R?): List { return sortedWith(compareByDescending(selector)) } /** * Returns a list of all elements sorted descending according to natural sort order of the value returned by specified [selector] function. */ -public inline fun > DoubleArray.sortedByDescending(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) selector: (Double) -> R?): List { +public inline fun > DoubleArray.sortedByDescending(crossinline selector: (Double) -> R?): List { return sortedWith(compareByDescending(selector)) } /** * Returns a list of all elements sorted descending according to natural sort order of the value returned by specified [selector] function. */ -public inline fun > FloatArray.sortedByDescending(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) selector: (Float) -> R?): List { +public inline fun > FloatArray.sortedByDescending(crossinline selector: (Float) -> R?): List { return sortedWith(compareByDescending(selector)) } /** * Returns a list of all elements sorted descending according to natural sort order of the value returned by specified [selector] function. */ -public inline fun > IntArray.sortedByDescending(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) selector: (Int) -> R?): List { +public inline fun > IntArray.sortedByDescending(crossinline selector: (Int) -> R?): List { return sortedWith(compareByDescending(selector)) } /** * Returns a list of all elements sorted descending according to natural sort order of the value returned by specified [selector] function. */ -public inline fun > LongArray.sortedByDescending(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) selector: (Long) -> R?): List { +public inline fun > LongArray.sortedByDescending(crossinline selector: (Long) -> R?): List { return sortedWith(compareByDescending(selector)) } /** * Returns a list of all elements sorted descending according to natural sort order of the value returned by specified [selector] function. */ -public inline fun > ShortArray.sortedByDescending(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) selector: (Short) -> R?): List { +public inline fun > ShortArray.sortedByDescending(crossinline selector: (Short) -> R?): List { return sortedWith(compareByDescending(selector)) } /** * Returns a list of all elements sorted descending according to natural sort order of the value returned by specified [selector] function. */ -public inline fun > Iterable.sortedByDescending(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) selector: (T) -> R?): List { +public inline fun > Iterable.sortedByDescending(crossinline selector: (T) -> R?): List { return sortedWith(compareByDescending(selector)) } /** * Returns a sequence that yields elements of this sequence sorted descending according to natural sort order of the value returned by specified [selector] function. */ -public inline fun > Sequence.sortedByDescending(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) selector: (T) -> R?): Sequence { +public inline fun > Sequence.sortedByDescending(crossinline selector: (T) -> R?): Sequence { return sortedWith(compareByDescending(selector)) } @@ -965,7 +965,7 @@ public fun Sequence.sortedWith(comparator: Comparator): Sequence /** * Returns a sorted list of all elements. */ -deprecated("Use sorted() instead.", ReplaceWith("sorted()")) +@Deprecated("Use sorted() instead.", ReplaceWith("sorted()")) public fun > Array.toSortedList(): List { val sortedList = toArrayList() java.util.Collections.sort(sortedList) @@ -975,7 +975,7 @@ public fun > Array.toSortedList(): List { /** * Returns a sorted list of all elements. */ -deprecated("Use sorted() instead.", ReplaceWith("sorted()")) +@Deprecated("Use sorted() instead.", ReplaceWith("sorted()")) public fun BooleanArray.toSortedList(): List { val sortedList = toArrayList() java.util.Collections.sort(sortedList) @@ -985,7 +985,7 @@ public fun BooleanArray.toSortedList(): List { /** * Returns a sorted list of all elements. */ -deprecated("Use sorted() instead.", ReplaceWith("sorted()")) +@Deprecated("Use sorted() instead.", ReplaceWith("sorted()")) public fun ByteArray.toSortedList(): List { val sortedList = toArrayList() java.util.Collections.sort(sortedList) @@ -995,7 +995,7 @@ public fun ByteArray.toSortedList(): List { /** * Returns a sorted list of all elements. */ -deprecated("Use sorted() instead.", ReplaceWith("sorted()")) +@Deprecated("Use sorted() instead.", ReplaceWith("sorted()")) public fun CharArray.toSortedList(): List { val sortedList = toArrayList() java.util.Collections.sort(sortedList) @@ -1005,7 +1005,7 @@ public fun CharArray.toSortedList(): List { /** * Returns a sorted list of all elements. */ -deprecated("Use sorted() instead.", ReplaceWith("sorted()")) +@Deprecated("Use sorted() instead.", ReplaceWith("sorted()")) public fun DoubleArray.toSortedList(): List { val sortedList = toArrayList() java.util.Collections.sort(sortedList) @@ -1015,7 +1015,7 @@ public fun DoubleArray.toSortedList(): List { /** * Returns a sorted list of all elements. */ -deprecated("Use sorted() instead.", ReplaceWith("sorted()")) +@Deprecated("Use sorted() instead.", ReplaceWith("sorted()")) public fun FloatArray.toSortedList(): List { val sortedList = toArrayList() java.util.Collections.sort(sortedList) @@ -1025,7 +1025,7 @@ public fun FloatArray.toSortedList(): List { /** * Returns a sorted list of all elements. */ -deprecated("Use sorted() instead.", ReplaceWith("sorted()")) +@Deprecated("Use sorted() instead.", ReplaceWith("sorted()")) public fun IntArray.toSortedList(): List { val sortedList = toArrayList() java.util.Collections.sort(sortedList) @@ -1035,7 +1035,7 @@ public fun IntArray.toSortedList(): List { /** * Returns a sorted list of all elements. */ -deprecated("Use sorted() instead.", ReplaceWith("sorted()")) +@Deprecated("Use sorted() instead.", ReplaceWith("sorted()")) public fun LongArray.toSortedList(): List { val sortedList = toArrayList() java.util.Collections.sort(sortedList) @@ -1045,7 +1045,7 @@ public fun LongArray.toSortedList(): List { /** * Returns a sorted list of all elements. */ -deprecated("Use sorted() instead.", ReplaceWith("sorted()")) +@Deprecated("Use sorted() instead.", ReplaceWith("sorted()")) public fun ShortArray.toSortedList(): List { val sortedList = toArrayList() java.util.Collections.sort(sortedList) @@ -1055,7 +1055,7 @@ public fun ShortArray.toSortedList(): List { /** * Returns a sorted list of all elements. */ -deprecated("Use sorted() instead.", ReplaceWith("sorted()")) +@Deprecated("Use sorted() instead.", ReplaceWith("sorted()")) public fun > Iterable.toSortedList(): List { val sortedList = toArrayList() java.util.Collections.sort(sortedList) @@ -1065,7 +1065,7 @@ public fun > Iterable.toSortedList(): List { /** * Returns a sorted list of all elements. */ -deprecated("Use asIterable().sorted() instead.", ReplaceWith("asIterable().sorted()")) +@Deprecated("Use asIterable().sorted() instead.", ReplaceWith("asIterable().sorted()")) public fun > Sequence.toSortedList(): List { val sortedList = toArrayList() java.util.Collections.sort(sortedList) @@ -1075,7 +1075,7 @@ public fun > Sequence.toSortedList(): List { /** * Returns a sorted list of all elements, ordered by results of specified [order] function. */ -deprecated("Use sortedBy(order) instead.", ReplaceWith("sortedBy(order)")) +@Deprecated("Use sortedBy(order) instead.", ReplaceWith("sortedBy(order)")) public fun > Array.toSortedListBy(order: (T) -> V): List { val sortedList = toArrayList() val sortBy: Comparator = compareBy(order) @@ -1086,7 +1086,7 @@ public fun > Array.toSortedListBy(order: (T) -> V): /** * Returns a sorted list of all elements, ordered by results of specified [order] function. */ -deprecated("Use sortedBy(order) instead.", ReplaceWith("sortedBy(order)")) +@Deprecated("Use sortedBy(order) instead.", ReplaceWith("sortedBy(order)")) public fun > BooleanArray.toSortedListBy(order: (Boolean) -> V): List { val sortedList = toArrayList() val sortBy: Comparator = compareBy(order) @@ -1097,7 +1097,7 @@ public fun > BooleanArray.toSortedListBy(order: (Boolean) -> V /** * Returns a sorted list of all elements, ordered by results of specified [order] function. */ -deprecated("Use sortedBy(order) instead.", ReplaceWith("sortedBy(order)")) +@Deprecated("Use sortedBy(order) instead.", ReplaceWith("sortedBy(order)")) public fun > ByteArray.toSortedListBy(order: (Byte) -> V): List { val sortedList = toArrayList() val sortBy: Comparator = compareBy(order) @@ -1108,7 +1108,7 @@ public fun > ByteArray.toSortedListBy(order: (Byte) -> V): Lis /** * Returns a sorted list of all elements, ordered by results of specified [order] function. */ -deprecated("Use sortedBy(order) instead.", ReplaceWith("sortedBy(order)")) +@Deprecated("Use sortedBy(order) instead.", ReplaceWith("sortedBy(order)")) public fun > CharArray.toSortedListBy(order: (Char) -> V): List { val sortedList = toArrayList() val sortBy: Comparator = compareBy(order) @@ -1119,7 +1119,7 @@ public fun > CharArray.toSortedListBy(order: (Char) -> V): Lis /** * Returns a sorted list of all elements, ordered by results of specified [order] function. */ -deprecated("Use sortedBy(order) instead.", ReplaceWith("sortedBy(order)")) +@Deprecated("Use sortedBy(order) instead.", ReplaceWith("sortedBy(order)")) public fun > DoubleArray.toSortedListBy(order: (Double) -> V): List { val sortedList = toArrayList() val sortBy: Comparator = compareBy(order) @@ -1130,7 +1130,7 @@ public fun > DoubleArray.toSortedListBy(order: (Double) -> V): /** * Returns a sorted list of all elements, ordered by results of specified [order] function. */ -deprecated("Use sortedBy(order) instead.", ReplaceWith("sortedBy(order)")) +@Deprecated("Use sortedBy(order) instead.", ReplaceWith("sortedBy(order)")) public fun > FloatArray.toSortedListBy(order: (Float) -> V): List { val sortedList = toArrayList() val sortBy: Comparator = compareBy(order) @@ -1141,7 +1141,7 @@ public fun > FloatArray.toSortedListBy(order: (Float) -> V): L /** * Returns a sorted list of all elements, ordered by results of specified [order] function. */ -deprecated("Use sortedBy(order) instead.", ReplaceWith("sortedBy(order)")) +@Deprecated("Use sortedBy(order) instead.", ReplaceWith("sortedBy(order)")) public fun > IntArray.toSortedListBy(order: (Int) -> V): List { val sortedList = toArrayList() val sortBy: Comparator = compareBy(order) @@ -1152,7 +1152,7 @@ public fun > IntArray.toSortedListBy(order: (Int) -> V): List< /** * Returns a sorted list of all elements, ordered by results of specified [order] function. */ -deprecated("Use sortedBy(order) instead.", ReplaceWith("sortedBy(order)")) +@Deprecated("Use sortedBy(order) instead.", ReplaceWith("sortedBy(order)")) public fun > LongArray.toSortedListBy(order: (Long) -> V): List { val sortedList = toArrayList() val sortBy: Comparator = compareBy(order) @@ -1163,7 +1163,7 @@ public fun > LongArray.toSortedListBy(order: (Long) -> V): Lis /** * Returns a sorted list of all elements, ordered by results of specified [order] function. */ -deprecated("Use sortedBy(order) instead.", ReplaceWith("sortedBy(order)")) +@Deprecated("Use sortedBy(order) instead.", ReplaceWith("sortedBy(order)")) public fun > ShortArray.toSortedListBy(order: (Short) -> V): List { val sortedList = toArrayList() val sortBy: Comparator = compareBy(order) @@ -1174,7 +1174,7 @@ public fun > ShortArray.toSortedListBy(order: (Short) -> V): L /** * Returns a sorted list of all elements, ordered by results of specified [order] function. */ -deprecated("Use sortedBy(order) instead.", ReplaceWith("sortedBy(order)")) +@Deprecated("Use sortedBy(order) instead.", ReplaceWith("sortedBy(order)")) public fun > Iterable.toSortedListBy(order: (T) -> V): List { val sortedList = toArrayList() val sortBy: Comparator = compareBy(order) @@ -1185,7 +1185,7 @@ public fun > Iterable.toSortedListBy(order: (T) -> V): L /** * Returns a sorted list of all elements, ordered by results of specified [order] function. */ -deprecated("Use asIterable().sortedBy(order) instead.", ReplaceWith("asIterable().sortedBy(order)")) +@Deprecated("Use asIterable().sortedBy(order) instead.", ReplaceWith("asIterable().sortedBy(order)")) public fun > Sequence.toSortedListBy(order: (T) -> V): List { val sortedList = toArrayList() val sortBy: Comparator = compareBy(order) diff --git a/libraries/stdlib/src/generated/_Ranges.kt b/libraries/stdlib/src/generated/_Ranges.kt index a784b639693..3bbc32e134b 100644 --- a/libraries/stdlib/src/generated/_Ranges.kt +++ b/libraries/stdlib/src/generated/_Ranges.kt @@ -13,7 +13,7 @@ import java.util.Collections // TODO: it's temporary while we have java.util.Col /** * Checks if the specified [item] belongs to this range. */ -platformName("intRangeContains") +@kotlin.jvm.JvmName("intRangeContains") public fun Range.contains(item: Byte): Boolean { return start <= item && item <= end } @@ -21,7 +21,7 @@ public fun Range.contains(item: Byte): Boolean { /** * Checks if the specified [item] belongs to this range. */ -platformName("longRangeContains") +@kotlin.jvm.JvmName("longRangeContains") public fun Range.contains(item: Byte): Boolean { return start <= item && item <= end } @@ -29,7 +29,7 @@ public fun Range.contains(item: Byte): Boolean { /** * Checks if the specified [item] belongs to this range. */ -platformName("shortRangeContains") +@kotlin.jvm.JvmName("shortRangeContains") public fun Range.contains(item: Byte): Boolean { return start <= item && item <= end } @@ -37,7 +37,7 @@ public fun Range.contains(item: Byte): Boolean { /** * Checks if the specified [item] belongs to this range. */ -platformName("doubleRangeContains") +@kotlin.jvm.JvmName("doubleRangeContains") public fun Range.contains(item: Byte): Boolean { return start <= item && item <= end } @@ -45,42 +45,42 @@ public fun Range.contains(item: Byte): Boolean { /** * Checks if the specified [item] belongs to this range. */ -platformName("floatRangeContains") +@kotlin.jvm.JvmName("floatRangeContains") public fun Range.contains(item: Byte): Boolean { return start <= item && item <= end } -deprecated("The 'contains' operation for a range of Char and Byte item is not supported and should not be used.") +@Deprecated("The 'contains' operation for a range of Char and Byte item is not supported and should not be used.") public fun CharRange.contains(item: Byte): Nothing { throw UnsupportedOperationException() } -deprecated("The 'contains' operation for a range of Int and Char item is not supported and should not be used.") +@Deprecated("The 'contains' operation for a range of Int and Char item is not supported and should not be used.") public fun IntRange.contains(item: Char): Nothing { throw UnsupportedOperationException() } -deprecated("The 'contains' operation for a range of Long and Char item is not supported and should not be used.") +@Deprecated("The 'contains' operation for a range of Long and Char item is not supported and should not be used.") public fun LongRange.contains(item: Char): Nothing { throw UnsupportedOperationException() } -deprecated("The 'contains' operation for a range of Byte and Char item is not supported and should not be used.") +@Deprecated("The 'contains' operation for a range of Byte and Char item is not supported and should not be used.") public fun ByteRange.contains(item: Char): Nothing { throw UnsupportedOperationException() } -deprecated("The 'contains' operation for a range of Short and Char item is not supported and should not be used.") +@Deprecated("The 'contains' operation for a range of Short and Char item is not supported and should not be used.") public fun ShortRange.contains(item: Char): Nothing { throw UnsupportedOperationException() } -deprecated("The 'contains' operation for a range of Double and Char item is not supported and should not be used.") +@Deprecated("The 'contains' operation for a range of Double and Char item is not supported and should not be used.") public fun DoubleRange.contains(item: Char): Nothing { throw UnsupportedOperationException() } -deprecated("The 'contains' operation for a range of Float and Char item is not supported and should not be used.") +@Deprecated("The 'contains' operation for a range of Float and Char item is not supported and should not be used.") public fun FloatRange.contains(item: Char): Nothing { throw UnsupportedOperationException() } @@ -88,7 +88,7 @@ public fun FloatRange.contains(item: Char): Nothing { /** * Checks if the specified [item] belongs to this range. */ -platformName("intRangeContains") +@kotlin.jvm.JvmName("intRangeContains") public fun Range.contains(item: Double): Boolean { return start <= item && item <= end } @@ -96,7 +96,7 @@ public fun Range.contains(item: Double): Boolean { /** * Checks if the specified [item] belongs to this range. */ -platformName("longRangeContains") +@kotlin.jvm.JvmName("longRangeContains") public fun Range.contains(item: Double): Boolean { return start <= item && item <= end } @@ -104,7 +104,7 @@ public fun Range.contains(item: Double): Boolean { /** * Checks if the specified [item] belongs to this range. */ -platformName("byteRangeContains") +@kotlin.jvm.JvmName("byteRangeContains") public fun Range.contains(item: Double): Boolean { return start <= item && item <= end } @@ -112,7 +112,7 @@ public fun Range.contains(item: Double): Boolean { /** * Checks if the specified [item] belongs to this range. */ -platformName("shortRangeContains") +@kotlin.jvm.JvmName("shortRangeContains") public fun Range.contains(item: Double): Boolean { return start <= item && item <= end } @@ -120,12 +120,12 @@ public fun Range.contains(item: Double): Boolean { /** * Checks if the specified [item] belongs to this range. */ -platformName("floatRangeContains") +@kotlin.jvm.JvmName("floatRangeContains") public fun Range.contains(item: Double): Boolean { return start <= item && item <= end } -deprecated("The 'contains' operation for a range of Char and Double item is not supported and should not be used.") +@Deprecated("The 'contains' operation for a range of Char and Double item is not supported and should not be used.") public fun CharRange.contains(item: Double): Nothing { throw UnsupportedOperationException() } @@ -133,7 +133,7 @@ public fun CharRange.contains(item: Double): Nothing { /** * Checks if the specified [item] belongs to this range. */ -platformName("intRangeContains") +@kotlin.jvm.JvmName("intRangeContains") public fun Range.contains(item: Float): Boolean { return start <= item && item <= end } @@ -141,7 +141,7 @@ public fun Range.contains(item: Float): Boolean { /** * Checks if the specified [item] belongs to this range. */ -platformName("longRangeContains") +@kotlin.jvm.JvmName("longRangeContains") public fun Range.contains(item: Float): Boolean { return start <= item && item <= end } @@ -149,7 +149,7 @@ public fun Range.contains(item: Float): Boolean { /** * Checks if the specified [item] belongs to this range. */ -platformName("byteRangeContains") +@kotlin.jvm.JvmName("byteRangeContains") public fun Range.contains(item: Float): Boolean { return start <= item && item <= end } @@ -157,7 +157,7 @@ public fun Range.contains(item: Float): Boolean { /** * Checks if the specified [item] belongs to this range. */ -platformName("shortRangeContains") +@kotlin.jvm.JvmName("shortRangeContains") public fun Range.contains(item: Float): Boolean { return start <= item && item <= end } @@ -165,12 +165,12 @@ public fun Range.contains(item: Float): Boolean { /** * Checks if the specified [item] belongs to this range. */ -platformName("doubleRangeContains") +@kotlin.jvm.JvmName("doubleRangeContains") public fun Range.contains(item: Float): Boolean { return start <= item && item <= end } -deprecated("The 'contains' operation for a range of Char and Float item is not supported and should not be used.") +@Deprecated("The 'contains' operation for a range of Char and Float item is not supported and should not be used.") public fun CharRange.contains(item: Float): Nothing { throw UnsupportedOperationException() } @@ -178,7 +178,7 @@ public fun CharRange.contains(item: Float): Nothing { /** * Checks if the specified [item] belongs to this range. */ -platformName("longRangeContains") +@kotlin.jvm.JvmName("longRangeContains") public fun Range.contains(item: Int): Boolean { return start <= item && item <= end } @@ -186,7 +186,7 @@ public fun Range.contains(item: Int): Boolean { /** * Checks if the specified [item] belongs to this range. */ -platformName("byteRangeContains") +@kotlin.jvm.JvmName("byteRangeContains") public fun Range.contains(item: Int): Boolean { return start <= item && item <= end } @@ -194,7 +194,7 @@ public fun Range.contains(item: Int): Boolean { /** * Checks if the specified [item] belongs to this range. */ -platformName("shortRangeContains") +@kotlin.jvm.JvmName("shortRangeContains") public fun Range.contains(item: Int): Boolean { return start <= item && item <= end } @@ -202,7 +202,7 @@ public fun Range.contains(item: Int): Boolean { /** * Checks if the specified [item] belongs to this range. */ -platformName("doubleRangeContains") +@kotlin.jvm.JvmName("doubleRangeContains") public fun Range.contains(item: Int): Boolean { return start <= item && item <= end } @@ -210,12 +210,12 @@ public fun Range.contains(item: Int): Boolean { /** * Checks if the specified [item] belongs to this range. */ -platformName("floatRangeContains") +@kotlin.jvm.JvmName("floatRangeContains") public fun Range.contains(item: Int): Boolean { return start <= item && item <= end } -deprecated("The 'contains' operation for a range of Char and Int item is not supported and should not be used.") +@Deprecated("The 'contains' operation for a range of Char and Int item is not supported and should not be used.") public fun CharRange.contains(item: Int): Nothing { throw UnsupportedOperationException() } @@ -223,7 +223,7 @@ public fun CharRange.contains(item: Int): Nothing { /** * Checks if the specified [item] belongs to this range. */ -platformName("intRangeContains") +@kotlin.jvm.JvmName("intRangeContains") public fun Range.contains(item: Long): Boolean { return start <= item && item <= end } @@ -231,7 +231,7 @@ public fun Range.contains(item: Long): Boolean { /** * Checks if the specified [item] belongs to this range. */ -platformName("byteRangeContains") +@kotlin.jvm.JvmName("byteRangeContains") public fun Range.contains(item: Long): Boolean { return start <= item && item <= end } @@ -239,7 +239,7 @@ public fun Range.contains(item: Long): Boolean { /** * Checks if the specified [item] belongs to this range. */ -platformName("shortRangeContains") +@kotlin.jvm.JvmName("shortRangeContains") public fun Range.contains(item: Long): Boolean { return start <= item && item <= end } @@ -247,7 +247,7 @@ public fun Range.contains(item: Long): Boolean { /** * Checks if the specified [item] belongs to this range. */ -platformName("doubleRangeContains") +@kotlin.jvm.JvmName("doubleRangeContains") public fun Range.contains(item: Long): Boolean { return start <= item && item <= end } @@ -255,12 +255,12 @@ public fun Range.contains(item: Long): Boolean { /** * Checks if the specified [item] belongs to this range. */ -platformName("floatRangeContains") +@kotlin.jvm.JvmName("floatRangeContains") public fun Range.contains(item: Long): Boolean { return start <= item && item <= end } -deprecated("The 'contains' operation for a range of Char and Long item is not supported and should not be used.") +@Deprecated("The 'contains' operation for a range of Char and Long item is not supported and should not be used.") public fun CharRange.contains(item: Long): Nothing { throw UnsupportedOperationException() } @@ -268,7 +268,7 @@ public fun CharRange.contains(item: Long): Nothing { /** * Checks if the specified [item] belongs to this range. */ -platformName("intRangeContains") +@kotlin.jvm.JvmName("intRangeContains") public fun Range.contains(item: Short): Boolean { return start <= item && item <= end } @@ -276,7 +276,7 @@ public fun Range.contains(item: Short): Boolean { /** * Checks if the specified [item] belongs to this range. */ -platformName("longRangeContains") +@kotlin.jvm.JvmName("longRangeContains") public fun Range.contains(item: Short): Boolean { return start <= item && item <= end } @@ -284,7 +284,7 @@ public fun Range.contains(item: Short): Boolean { /** * Checks if the specified [item] belongs to this range. */ -platformName("byteRangeContains") +@kotlin.jvm.JvmName("byteRangeContains") public fun Range.contains(item: Short): Boolean { return start <= item && item <= end } @@ -292,7 +292,7 @@ public fun Range.contains(item: Short): Boolean { /** * Checks if the specified [item] belongs to this range. */ -platformName("doubleRangeContains") +@kotlin.jvm.JvmName("doubleRangeContains") public fun Range.contains(item: Short): Boolean { return start <= item && item <= end } @@ -300,12 +300,12 @@ public fun Range.contains(item: Short): Boolean { /** * Checks if the specified [item] belongs to this range. */ -platformName("floatRangeContains") +@kotlin.jvm.JvmName("floatRangeContains") public fun Range.contains(item: Short): Boolean { return start <= item && item <= end } -deprecated("The 'contains' operation for a range of Char and Short item is not supported and should not be used.") +@Deprecated("The 'contains' operation for a range of Char and Short item is not supported and should not be used.") public fun CharRange.contains(item: Short): Nothing { throw UnsupportedOperationException() } diff --git a/libraries/stdlib/src/generated/_Sequences.kt b/libraries/stdlib/src/generated/_Sequences.kt index 6e99878fc17..f4f889b02bd 100644 --- a/libraries/stdlib/src/generated/_Sequences.kt +++ b/libraries/stdlib/src/generated/_Sequences.kt @@ -162,7 +162,7 @@ public fun String.asSequence(): Sequence { /** * Returns a sequence from the given collection */ -deprecated("Use asSequence() instead", ReplaceWith("asSequence()")) +@Deprecated("Use asSequence() instead", ReplaceWith("asSequence()")) public fun Array.sequence(): Sequence { return asSequence() } @@ -170,7 +170,7 @@ public fun Array.sequence(): Sequence { /** * Returns a sequence from the given collection */ -deprecated("Use asSequence() instead", ReplaceWith("asSequence()")) +@Deprecated("Use asSequence() instead", ReplaceWith("asSequence()")) public fun BooleanArray.sequence(): Sequence { return asSequence() } @@ -178,7 +178,7 @@ public fun BooleanArray.sequence(): Sequence { /** * Returns a sequence from the given collection */ -deprecated("Use asSequence() instead", ReplaceWith("asSequence()")) +@Deprecated("Use asSequence() instead", ReplaceWith("asSequence()")) public fun ByteArray.sequence(): Sequence { return asSequence() } @@ -186,7 +186,7 @@ public fun ByteArray.sequence(): Sequence { /** * Returns a sequence from the given collection */ -deprecated("Use asSequence() instead", ReplaceWith("asSequence()")) +@Deprecated("Use asSequence() instead", ReplaceWith("asSequence()")) public fun CharArray.sequence(): Sequence { return asSequence() } @@ -194,7 +194,7 @@ public fun CharArray.sequence(): Sequence { /** * Returns a sequence from the given collection */ -deprecated("Use asSequence() instead", ReplaceWith("asSequence()")) +@Deprecated("Use asSequence() instead", ReplaceWith("asSequence()")) public fun DoubleArray.sequence(): Sequence { return asSequence() } @@ -202,7 +202,7 @@ public fun DoubleArray.sequence(): Sequence { /** * Returns a sequence from the given collection */ -deprecated("Use asSequence() instead", ReplaceWith("asSequence()")) +@Deprecated("Use asSequence() instead", ReplaceWith("asSequence()")) public fun FloatArray.sequence(): Sequence { return asSequence() } @@ -210,7 +210,7 @@ public fun FloatArray.sequence(): Sequence { /** * Returns a sequence from the given collection */ -deprecated("Use asSequence() instead", ReplaceWith("asSequence()")) +@Deprecated("Use asSequence() instead", ReplaceWith("asSequence()")) public fun IntArray.sequence(): Sequence { return asSequence() } @@ -218,7 +218,7 @@ public fun IntArray.sequence(): Sequence { /** * Returns a sequence from the given collection */ -deprecated("Use asSequence() instead", ReplaceWith("asSequence()")) +@Deprecated("Use asSequence() instead", ReplaceWith("asSequence()")) public fun LongArray.sequence(): Sequence { return asSequence() } @@ -226,7 +226,7 @@ public fun LongArray.sequence(): Sequence { /** * Returns a sequence from the given collection */ -deprecated("Use asSequence() instead", ReplaceWith("asSequence()")) +@Deprecated("Use asSequence() instead", ReplaceWith("asSequence()")) public fun ShortArray.sequence(): Sequence { return asSequence() } @@ -234,7 +234,7 @@ public fun ShortArray.sequence(): Sequence { /** * Returns a sequence from the given collection */ -deprecated("Use asSequence() instead", ReplaceWith("asSequence()")) +@Deprecated("Use asSequence() instead", ReplaceWith("asSequence()")) public fun Iterable.sequence(): Sequence { return asSequence() } @@ -242,7 +242,7 @@ public fun Iterable.sequence(): Sequence { /** * Returns a sequence from the given collection */ -deprecated("Use asSequence() instead", ReplaceWith("asSequence()")) +@Deprecated("Use asSequence() instead", ReplaceWith("asSequence()")) public fun Map.sequence(): Sequence> { return asSequence() } @@ -250,7 +250,7 @@ public fun Map.sequence(): Sequence> { /** * Returns a sequence from the given collection */ -deprecated("Use asSequence() instead", ReplaceWith("asSequence()")) +@Deprecated("Use asSequence() instead", ReplaceWith("asSequence()")) public fun Sequence.sequence(): Sequence { return this } @@ -258,7 +258,7 @@ public fun Sequence.sequence(): Sequence { /** * Returns a sequence from the given collection */ -deprecated("Use asSequence() instead", ReplaceWith("asSequence()")) +@Deprecated("Use asSequence() instead", ReplaceWith("asSequence()")) public fun String.sequence(): Sequence { return asSequence() } diff --git a/libraries/stdlib/src/generated/_SpecialJVM.kt b/libraries/stdlib/src/generated/_SpecialJVM.kt index e32a470a444..24e38bfb233 100644 --- a/libraries/stdlib/src/generated/_SpecialJVM.kt +++ b/libraries/stdlib/src/generated/_SpecialJVM.kt @@ -329,7 +329,7 @@ public fun ShortArray.copyOf(newSize: Int): ShortArray { /** * Returns new array which is a copy of the original array. */ -platformName("mutableCopyOf") +@JvmName("mutableCopyOf") public fun Array.copyOf(newSize: Int): Array { return Arrays.copyOf(this, newSize) } diff --git a/libraries/tools/kotlin-stdlib-gen/src/generators/GenerateStandardLib.kt b/libraries/tools/kotlin-stdlib-gen/src/generators/GenerateStandardLib.kt index d159522363b..0dcc36ff8c0 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/generators/GenerateStandardLib.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/generators/GenerateStandardLib.kt @@ -17,13 +17,13 @@ private val COMMON_AUTOGENERATED_WARNING: String = """// * at runtime. */ fun main(args: Array) { - require(args.size() == 1, "Expecting Kotlin project home path as an argument") + require(args.size() == 1) { "Expecting Kotlin project home path as an argument" } val outDir = File(File(args[0]), "libraries/stdlib/src/generated") - require(outDir.exists(), "${outDir.getPath()} doesn't exist!") + require(outDir.exists()) { "$outDir doesn't exist!" } val jsCoreDir = File(args[0], "js/js.libraries/src/core") - require(jsCoreDir.exists(), "${jsCoreDir.getPath()} doesn't exist!") + require(jsCoreDir.exists()) { "$jsCoreDir doesn't exist!" } generateCollectionsAPI(outDir) generateCollectionsJsAPI(jsCoreDir) @@ -31,16 +31,16 @@ fun main(args: Array) { } fun List.writeTo(file: File, builder: GenericFunction.() -> String) { - println("Generating file: ${file.getPath()}") + println("Generating file: $file") val its = FileWriter(file) its.use { its.append("package kotlin\n\n") its.append("$COMMON_AUTOGENERATED_WARNING\n\n") - its.append("import kotlin.platform.*\n") + its.append("import kotlin.platform.*\n") // TODO: Remove unneeded import its.append("import java.util.*\n\n") its.append("import java.util.Collections // TODO: it's temporary while we have java.util.Collections in js\n\n") - for (t in this.sort()) { + for (t in this.sorted()) { its.append(t.builder()) } } diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/Elements.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/Elements.kt index 527195bf7ee..ca1c738e996 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/Elements.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/Elements.kt @@ -762,7 +762,7 @@ fun elements(): List { templates addAll (1..5).map { n -> f("component$n()") { inline(true) - annotations("""suppress("NOTHING_TO_INLINE")""") + annotations("""@Suppress("NOTHING_TO_INLINE")""") fun getOrdinal(n: Int) = n.toString() + when (n) { 1 -> "st" 2 -> "nd" diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/Engine.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/Engine.kt index a1a0135ac5b..f671239f9b3 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/Engine.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/Engine.kt @@ -326,13 +326,13 @@ class GenericFunction(val signature: String, val keyword: String = "fun") : Comp deprecate[f]?.let { deprecated -> val replacement = deprecateReplacement[f]?.let { ", ReplaceWith(\"$it\")" } ?: "" - builder.append("deprecated(\"$deprecated\"$replacement)\n") + builder.append("@Deprecated(\"$deprecated\"$replacement)\n") } if (!f.isPrimitiveSpecialization && primitive != null) { platformName[primitive] ?.replace("", primitive.name) - ?.let { platformName -> builder.append("platformName(\"${platformName}\")\n")} + ?.let { platformName -> builder.append("@kotlin.jvm.JvmName(\"${platformName}\")\n")} } annotations[f]?.let { builder.append(it).append('\n') } diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/Ordering.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/Ordering.kt index c86612cb757..3a2586dcdd2 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/Ordering.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/Ordering.kt @@ -234,7 +234,7 @@ fun ordering(): List { } } - templates add f("sortedBy(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) selector: (T) -> R?)") { + templates add f("sortedBy(crossinline selector: (T) -> R?)") { exclude(Strings) inline(true) returns("List") @@ -256,7 +256,7 @@ fun ordering(): List { } } - templates add f("sortedByDescending(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) selector: (T) -> R?)") { + templates add f("sortedByDescending(crossinline selector: (T) -> R?)") { exclude(Strings) inline(true) returns("List") @@ -350,7 +350,7 @@ fun ordering(): List { exclude(Strings) } - templates add f("sortBy(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) order: (T) -> R)") { + templates add f("sortBy(crossinline order: (T) -> R)") { inline(true) doc { @@ -402,7 +402,7 @@ fun ordering(): List { only(Sequences, ArraysOfObjects, ArraysOfPrimitives, Iterables) } - templates add f("sortDescendingBy(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) order: (T) -> R)") { + templates add f("sortDescendingBy(crossinline order: (T) -> R)") { inline(true) doc { diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/Ranges.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/Ranges.kt index 0b42fc0e114..54d969d102b 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/Ranges.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/Ranges.kt @@ -131,7 +131,7 @@ fun ranges(): List { only(RangesOfPrimitives) only(rangeType) returns("Nothing") - annotations("""deprecated("The 'contains' operation for a range of $rangeType and $itemType item is not supported and should not be used.")""") + annotations("""@Deprecated("The 'contains' operation for a range of $rangeType and $itemType item is not supported and should not be used.")""") body { """throw UnsupportedOperationException()""" } } } diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/SpecialJS.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/SpecialJS.kt index cf35d7d26a7..33179fe1257 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/SpecialJS.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/SpecialJS.kt @@ -42,7 +42,7 @@ fun specialJS(): List { only(ArraysOfObjects, ArraysOfPrimitives) doc { "Returns new array which is a copy of range of original array." } inline(true) - annotations("""suppress("NOTHING_TO_INLINE")""") + annotations("""@Suppress("NOTHING_TO_INLINE")""") returns("SELF") returns(ArraysOfObjects) { "Array" } body { @@ -54,7 +54,7 @@ fun specialJS(): List { only(ArraysOfObjects, ArraysOfPrimitives) doc { "Returns new array which is a copy of the original array." } inline(true) - annotations("""suppress("NOTHING_TO_INLINE")""") + annotations("""@Suppress("NOTHING_TO_INLINE")""") returns("SELF") returns(ArraysOfObjects) { "Array" } body { @@ -95,7 +95,7 @@ fun specialJS(): List { returns("SELF") returns(ArraysOfObjects) { "Array" } inline(true) - annotations("""suppress("NOTHING_TO_INLINE")""") + annotations("""@Suppress("NOTHING_TO_INLINE")""") doc { "Returns an array containing all elements of the original array and then the given [element]." } body() { """ @@ -121,7 +121,7 @@ fun specialJS(): List { only(ArraysOfObjects, ArraysOfPrimitives) doc { "Returns an array containing all elements of the original array and then all elements of the given [array]." } inline(true) - annotations("""suppress("NOTHING_TO_INLINE")""") + annotations("""@Suppress("NOTHING_TO_INLINE")""") returns("SELF") returns(ArraysOfObjects) { "Array" } body { @@ -134,7 +134,7 @@ fun specialJS(): List { templates add f("sort(comparison: (T, T) -> Int)") { only(ArraysOfObjects, ArraysOfPrimitives) exclude(PrimitiveType.Boolean) - annotations("native") + annotations("@native") returns("Unit") doc { "Sorts the array inplace according to the order specified by the given [comparison] function." } body { "return noImpl" } @@ -154,7 +154,7 @@ fun specialJS(): List { exclude(PrimitiveType.Long) returns("Unit") doc { "Sorts the array inplace." } - annotations("""library("primitiveArraySort")""") + annotations("""@library("primitiveArraySort")""") body { "return noImpl" } } diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/SpecialJVM.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/SpecialJVM.kt index 47292031bc5..8143d9e6d88 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/SpecialJVM.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/SpecialJVM.kt @@ -84,7 +84,7 @@ fun specialJVM(): List { } returns(ArraysOfObjects) { "Array" } returns(InvariantArraysOfObjects) { "Array" } - annotations(InvariantArraysOfObjects) { """platformName("mutableCopyOf")"""} + annotations(InvariantArraysOfObjects) { """@JvmName("mutableCopyOf")"""} } templates add f("fill(element: T, fromIndex: Int = 0, toIndex: Int = size())") {