diff --git a/libraries/stdlib/src/generated/_Arrays.kt b/libraries/stdlib/src/generated/_Arrays.kt index bec2f48a2f0..f52ba7e04dd 100644 --- a/libraries/stdlib/src/generated/_Arrays.kt +++ b/libraries/stdlib/src/generated/_Arrays.kt @@ -6961,7 +6961,6 @@ public fun CharArray.toSet(): Set { /** * Returns a [SortedSet] of all elements. */ -@kotlin.jvm.JvmVersion public fun > Array.toSortedSet(): SortedSet { return toCollection(TreeSet()) } @@ -6969,7 +6968,6 @@ public fun > Array.toSortedSet(): SortedSet { /** * Returns a [SortedSet] of all elements. */ -@kotlin.jvm.JvmVersion public fun ByteArray.toSortedSet(): SortedSet { return toCollection(TreeSet()) } @@ -6977,7 +6975,6 @@ public fun ByteArray.toSortedSet(): SortedSet { /** * Returns a [SortedSet] of all elements. */ -@kotlin.jvm.JvmVersion public fun ShortArray.toSortedSet(): SortedSet { return toCollection(TreeSet()) } @@ -6985,7 +6982,6 @@ public fun ShortArray.toSortedSet(): SortedSet { /** * Returns a [SortedSet] of all elements. */ -@kotlin.jvm.JvmVersion public fun IntArray.toSortedSet(): SortedSet { return toCollection(TreeSet()) } @@ -6993,7 +6989,6 @@ public fun IntArray.toSortedSet(): SortedSet { /** * Returns a [SortedSet] of all elements. */ -@kotlin.jvm.JvmVersion public fun LongArray.toSortedSet(): SortedSet { return toCollection(TreeSet()) } @@ -7001,7 +6996,6 @@ public fun LongArray.toSortedSet(): SortedSet { /** * Returns a [SortedSet] of all elements. */ -@kotlin.jvm.JvmVersion public fun FloatArray.toSortedSet(): SortedSet { return toCollection(TreeSet()) } @@ -7009,7 +7003,6 @@ public fun FloatArray.toSortedSet(): SortedSet { /** * Returns a [SortedSet] of all elements. */ -@kotlin.jvm.JvmVersion public fun DoubleArray.toSortedSet(): SortedSet { return toCollection(TreeSet()) } @@ -7017,7 +7010,6 @@ public fun DoubleArray.toSortedSet(): SortedSet { /** * Returns a [SortedSet] of all elements. */ -@kotlin.jvm.JvmVersion public fun BooleanArray.toSortedSet(): SortedSet { return toCollection(TreeSet()) } @@ -7025,7 +7017,6 @@ public fun BooleanArray.toSortedSet(): SortedSet { /** * Returns a [SortedSet] of all elements. */ -@kotlin.jvm.JvmVersion public fun CharArray.toSortedSet(): SortedSet { return toCollection(TreeSet()) } @@ -7035,7 +7026,6 @@ public fun CharArray.toSortedSet(): SortedSet { * * Elements in the set returned are sorted according to the given [comparator]. */ -@kotlin.jvm.JvmVersion public fun Array.toSortedSet(comparator: Comparator): SortedSet { return toCollection(TreeSet(comparator)) } @@ -13784,7 +13774,6 @@ public fun CharArray.toTypedArray(): Array { * The insertion point is defined as the index at which the element should be inserted, * so that the array (or the specified subrange of array) still remains sorted according to the specified [comparator]. */ -@kotlin.jvm.JvmVersion public fun Array.binarySearch(element: T, comparator: Comparator, fromIndex: Int = 0, toIndex: Int = size): Int { return java.util.Arrays.binarySearch(this, fromIndex, toIndex, element, comparator) } @@ -13800,7 +13789,6 @@ public fun Array.binarySearch(element: T, comparator: Comparator Array.binarySearch(element: T, fromIndex: Int = 0, toIndex: Int = size): Int { return java.util.Arrays.binarySearch(this, fromIndex, toIndex, element) } @@ -13816,7 +13804,6 @@ public fun Array.binarySearch(element: T, fromIndex: Int = 0, toIndex * The insertion point is defined as the index at which the element should be inserted, * so that the array (or the specified subrange of array) still remains sorted. */ -@kotlin.jvm.JvmVersion public fun ByteArray.binarySearch(element: Byte, fromIndex: Int = 0, toIndex: Int = size): Int { return java.util.Arrays.binarySearch(this, fromIndex, toIndex, element) } @@ -13832,7 +13819,6 @@ public fun ByteArray.binarySearch(element: Byte, fromIndex: Int = 0, toIndex: In * The insertion point is defined as the index at which the element should be inserted, * so that the array (or the specified subrange of array) still remains sorted. */ -@kotlin.jvm.JvmVersion public fun ShortArray.binarySearch(element: Short, fromIndex: Int = 0, toIndex: Int = size): Int { return java.util.Arrays.binarySearch(this, fromIndex, toIndex, element) } @@ -13848,7 +13834,6 @@ public fun ShortArray.binarySearch(element: Short, fromIndex: Int = 0, toIndex: * The insertion point is defined as the index at which the element should be inserted, * so that the array (or the specified subrange of array) still remains sorted. */ -@kotlin.jvm.JvmVersion public fun IntArray.binarySearch(element: Int, fromIndex: Int = 0, toIndex: Int = size): Int { return java.util.Arrays.binarySearch(this, fromIndex, toIndex, element) } @@ -13864,7 +13849,6 @@ public fun IntArray.binarySearch(element: Int, fromIndex: Int = 0, toIndex: Int * The insertion point is defined as the index at which the element should be inserted, * so that the array (or the specified subrange of array) still remains sorted. */ -@kotlin.jvm.JvmVersion public fun LongArray.binarySearch(element: Long, fromIndex: Int = 0, toIndex: Int = size): Int { return java.util.Arrays.binarySearch(this, fromIndex, toIndex, element) } @@ -13880,7 +13864,6 @@ public fun LongArray.binarySearch(element: Long, fromIndex: Int = 0, toIndex: In * The insertion point is defined as the index at which the element should be inserted, * so that the array (or the specified subrange of array) still remains sorted. */ -@kotlin.jvm.JvmVersion public fun FloatArray.binarySearch(element: Float, fromIndex: Int = 0, toIndex: Int = size): Int { return java.util.Arrays.binarySearch(this, fromIndex, toIndex, element) } @@ -13896,7 +13879,6 @@ public fun FloatArray.binarySearch(element: Float, fromIndex: Int = 0, toIndex: * The insertion point is defined as the index at which the element should be inserted, * so that the array (or the specified subrange of array) still remains sorted. */ -@kotlin.jvm.JvmVersion public fun DoubleArray.binarySearch(element: Double, fromIndex: Int = 0, toIndex: Int = size): Int { return java.util.Arrays.binarySearch(this, fromIndex, toIndex, element) } @@ -13912,7 +13894,6 @@ public fun DoubleArray.binarySearch(element: Double, fromIndex: Int = 0, toIndex * The insertion point is defined as the index at which the element should be inserted, * so that the array (or the specified subrange of array) still remains sorted. */ -@kotlin.jvm.JvmVersion public fun CharArray.binarySearch(element: Char, fromIndex: Int = 0, toIndex: Int = size): Int { return java.util.Arrays.binarySearch(this, fromIndex, toIndex, element) } @@ -13920,7 +13901,6 @@ public fun CharArray.binarySearch(element: Char, fromIndex: Int = 0, toIndex: In /** * Fills original array with the provided value. */ -@kotlin.jvm.JvmVersion public fun Array.fill(element: T, fromIndex: Int = 0, toIndex: Int = size): Unit { java.util.Arrays.fill(this, fromIndex, toIndex, element) } @@ -13928,7 +13908,6 @@ public fun Array.fill(element: T, fromIndex: Int = 0, toIndex: Int = size /** * Fills original array with the provided value. */ -@kotlin.jvm.JvmVersion public fun ByteArray.fill(element: Byte, fromIndex: Int = 0, toIndex: Int = size): Unit { java.util.Arrays.fill(this, fromIndex, toIndex, element) } @@ -13936,7 +13915,6 @@ public fun ByteArray.fill(element: Byte, fromIndex: Int = 0, toIndex: Int = size /** * Fills original array with the provided value. */ -@kotlin.jvm.JvmVersion public fun ShortArray.fill(element: Short, fromIndex: Int = 0, toIndex: Int = size): Unit { java.util.Arrays.fill(this, fromIndex, toIndex, element) } @@ -13944,7 +13922,6 @@ public fun ShortArray.fill(element: Short, fromIndex: Int = 0, toIndex: Int = si /** * Fills original array with the provided value. */ -@kotlin.jvm.JvmVersion public fun IntArray.fill(element: Int, fromIndex: Int = 0, toIndex: Int = size): Unit { java.util.Arrays.fill(this, fromIndex, toIndex, element) } @@ -13952,7 +13929,6 @@ public fun IntArray.fill(element: Int, fromIndex: Int = 0, toIndex: Int = size): /** * Fills original array with the provided value. */ -@kotlin.jvm.JvmVersion public fun LongArray.fill(element: Long, fromIndex: Int = 0, toIndex: Int = size): Unit { java.util.Arrays.fill(this, fromIndex, toIndex, element) } @@ -13960,7 +13936,6 @@ public fun LongArray.fill(element: Long, fromIndex: Int = 0, toIndex: Int = size /** * Fills original array with the provided value. */ -@kotlin.jvm.JvmVersion public fun FloatArray.fill(element: Float, fromIndex: Int = 0, toIndex: Int = size): Unit { java.util.Arrays.fill(this, fromIndex, toIndex, element) } @@ -13968,7 +13943,6 @@ public fun FloatArray.fill(element: Float, fromIndex: Int = 0, toIndex: Int = si /** * Fills original array with the provided value. */ -@kotlin.jvm.JvmVersion public fun DoubleArray.fill(element: Double, fromIndex: Int = 0, toIndex: Int = size): Unit { java.util.Arrays.fill(this, fromIndex, toIndex, element) } @@ -13976,7 +13950,6 @@ public fun DoubleArray.fill(element: Double, fromIndex: Int = 0, toIndex: Int = /** * Fills original array with the provided value. */ -@kotlin.jvm.JvmVersion public fun BooleanArray.fill(element: Boolean, fromIndex: Int = 0, toIndex: Int = size): Unit { java.util.Arrays.fill(this, fromIndex, toIndex, element) } @@ -13984,7 +13957,6 @@ public fun BooleanArray.fill(element: Boolean, fromIndex: Int = 0, toIndex: Int /** * Fills original array with the provided value. */ -@kotlin.jvm.JvmVersion public fun CharArray.fill(element: Char, fromIndex: Int = 0, toIndex: Int = size): Unit { java.util.Arrays.fill(this, fromIndex, toIndex, element) } @@ -13992,7 +13964,6 @@ public fun CharArray.fill(element: Char, fromIndex: Int = 0, toIndex: Int = size /** * Returns a list containing all elements that are instances of specified class. */ -@kotlin.jvm.JvmVersion public fun Array<*>.filterIsInstance(klass: Class): List { return filterIsInstanceTo(ArrayList(), klass) } @@ -14000,7 +13971,6 @@ public fun Array<*>.filterIsInstance(klass: Class): List { /** * Appends all elements that are instances of specified class to the given [destination]. */ -@kotlin.jvm.JvmVersion public fun , R> Array<*>.filterIsInstanceTo(destination: C, klass: Class): C { @Suppress("UNCHECKED_CAST") for (element in this) if (klass.isInstance(element)) destination.add(element as R) @@ -14012,7 +13982,6 @@ public fun , R> Array<*>.filterIsInstanceTo(destinat * * @throws ClassCastException if any element of the array is not [Comparable]. */ -@kotlin.jvm.JvmVersion public fun Array.sort(): Unit { if (size > 1) java.util.Arrays.sort(this) } @@ -14020,7 +13989,6 @@ public fun Array.sort(): Unit { /** * Sorts a range in the array in-place. */ -@kotlin.jvm.JvmVersion public fun Array.sort(fromIndex: Int = 0, toIndex: Int = size): Unit { java.util.Arrays.sort(this, fromIndex, toIndex) } @@ -14028,7 +13996,6 @@ public fun Array.sort(fromIndex: Int = 0, toIndex: Int = size): Unit /** * Sorts a range in the array in-place. */ -@kotlin.jvm.JvmVersion public fun ByteArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit { java.util.Arrays.sort(this, fromIndex, toIndex) } @@ -14036,7 +14003,6 @@ public fun ByteArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit { /** * Sorts a range in the array in-place. */ -@kotlin.jvm.JvmVersion public fun ShortArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit { java.util.Arrays.sort(this, fromIndex, toIndex) } @@ -14044,7 +14010,6 @@ public fun ShortArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit { /** * Sorts a range in the array in-place. */ -@kotlin.jvm.JvmVersion public fun IntArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit { java.util.Arrays.sort(this, fromIndex, toIndex) } @@ -14052,7 +14017,6 @@ public fun IntArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit { /** * Sorts a range in the array in-place. */ -@kotlin.jvm.JvmVersion public fun LongArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit { java.util.Arrays.sort(this, fromIndex, toIndex) } @@ -14060,7 +14024,6 @@ public fun LongArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit { /** * Sorts a range in the array in-place. */ -@kotlin.jvm.JvmVersion public fun FloatArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit { java.util.Arrays.sort(this, fromIndex, toIndex) } @@ -14068,7 +14031,6 @@ public fun FloatArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit { /** * Sorts a range in the array in-place. */ -@kotlin.jvm.JvmVersion public fun DoubleArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit { java.util.Arrays.sort(this, fromIndex, toIndex) } @@ -14076,7 +14038,6 @@ public fun DoubleArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit { /** * Sorts a range in the array in-place. */ -@kotlin.jvm.JvmVersion public fun CharArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit { java.util.Arrays.sort(this, fromIndex, toIndex) } @@ -14084,7 +14045,6 @@ public fun CharArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit { /** * Sorts a range in the array in-place with the given [comparator]. */ -@kotlin.jvm.JvmVersion public fun Array.sortWith(comparator: Comparator, fromIndex: Int = 0, toIndex: Int = size): Unit { java.util.Arrays.sort(this, fromIndex, toIndex, comparator) } diff --git a/libraries/stdlib/src/generated/_Collections.kt b/libraries/stdlib/src/generated/_Collections.kt index aa8d9d45079..45edfb77084 100644 --- a/libraries/stdlib/src/generated/_Collections.kt +++ b/libraries/stdlib/src/generated/_Collections.kt @@ -1101,7 +1101,6 @@ public fun Iterable.toSet(): Set { /** * Returns a [SortedSet] of all elements. */ -@kotlin.jvm.JvmVersion public fun > Iterable.toSortedSet(): SortedSet { return toCollection(TreeSet()) } @@ -1111,7 +1110,6 @@ public fun > Iterable.toSortedSet(): SortedSet { * * Elements in the set returned are sorted according to the given [comparator]. */ -@kotlin.jvm.JvmVersion public fun Iterable.toSortedSet(comparator: Comparator): SortedSet { return toCollection(TreeSet(comparator)) } @@ -2358,7 +2356,6 @@ public fun Iterable.sum(): Double { /** * Returns a list containing all elements that are instances of specified class. */ -@kotlin.jvm.JvmVersion public fun Iterable<*>.filterIsInstance(klass: Class): List { return filterIsInstanceTo(ArrayList(), klass) } @@ -2366,7 +2363,6 @@ public fun Iterable<*>.filterIsInstance(klass: Class): List { /** * Appends all elements that are instances of specified class to the given [destination]. */ -@kotlin.jvm.JvmVersion public fun , R> Iterable<*>.filterIsInstanceTo(destination: C, klass: Class): C { @Suppress("UNCHECKED_CAST") for (element in this) if (klass.isInstance(element)) destination.add(element as R) diff --git a/libraries/stdlib/src/generated/_Sequences.kt b/libraries/stdlib/src/generated/_Sequences.kt index d48df754850..b4435f10c23 100644 --- a/libraries/stdlib/src/generated/_Sequences.kt +++ b/libraries/stdlib/src/generated/_Sequences.kt @@ -679,7 +679,6 @@ public fun Sequence.toSet(): Set { * * The operation is _terminal_. */ -@kotlin.jvm.JvmVersion public fun > Sequence.toSortedSet(): SortedSet { return toCollection(TreeSet()) } @@ -691,7 +690,6 @@ public fun > Sequence.toSortedSet(): SortedSet { * * The operation is _terminal_. */ -@kotlin.jvm.JvmVersion public fun Sequence.toSortedSet(comparator: Comparator): SortedSet { return toCollection(TreeSet(comparator)) } @@ -1856,7 +1854,6 @@ public fun Sequence.sum(): Double { /** * Returns a sequence containing all elements that are instances of specified class. */ -@kotlin.jvm.JvmVersion public fun Sequence<*>.filterIsInstance(klass: Class): Sequence { @Suppress("UNCHECKED_CAST") return filter { klass.isInstance(it) } as Sequence @@ -1865,7 +1862,6 @@ public fun Sequence<*>.filterIsInstance(klass: Class): Sequence { /** * Appends all elements that are instances of specified class to the given [destination]. */ -@kotlin.jvm.JvmVersion public fun , R> Sequence<*>.filterIsInstanceTo(destination: C, klass: Class): C { @Suppress("UNCHECKED_CAST") for (element in this) if (klass.isInstance(element)) destination.add(element as R) diff --git a/libraries/stdlib/src/generated/_Strings.kt b/libraries/stdlib/src/generated/_Strings.kt index 6aade189aa3..710f4c95b99 100644 --- a/libraries/stdlib/src/generated/_Strings.kt +++ b/libraries/stdlib/src/generated/_Strings.kt @@ -628,7 +628,6 @@ public fun CharSequence.toSet(): Set { /** * Returns a [SortedSet] of all characters. */ -@kotlin.jvm.JvmVersion public fun CharSequence.toSortedSet(): SortedSet { return toCollection(TreeSet()) } diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/Snapshots.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/Snapshots.kt index d0be59d8caa..5f035725b41 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/Snapshots.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/Snapshots.kt @@ -99,7 +99,6 @@ object Snapshots : TemplateGroupBase() { include(CharSequences) platforms(Platform.JVM) } builder { - jvmOnly = true typeParam("T: Comparable") doc { "Returns a [SortedSet] of all ${f.element.pluralize()}." } returns("SortedSet") @@ -110,7 +109,6 @@ object Snapshots : TemplateGroupBase() { include(Iterables, ArraysOfObjects, Sequences) platforms(Platform.JVM) } builder { - jvmOnly = true doc { """ Returns a [SortedSet] of all ${f.element.pluralize()}. diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/SpecialJVM.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/SpecialJVM.kt index 62f91ad5c1c..dd8e16a4468 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/SpecialJVM.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/SpecialJVM.kt @@ -19,11 +19,6 @@ package templates import templates.Family.* object PlatformSpecialized : TemplateGroupBase() { - init { - defaultBuilder { - jvmOnly = true - } - } val f_fill = fn("fill(element: T, fromIndex: Int = 0, toIndex: Int = size)") { platforms(Platform.JVM) diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/dsl/MemberBuilder.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/dsl/MemberBuilder.kt index f38525a1058..98e792206c6 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/dsl/MemberBuilder.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/dsl/MemberBuilder.kt @@ -59,8 +59,6 @@ class MemberBuilder( var deprecate: Deprecation? = null; private set var since: String? = null; private set var platformName: String? = null; private set - @Deprecated("Use platforms when building template") - var jvmOnly: Boolean = false var visibility: String? = null; private set var external: Boolean = false; private set @@ -330,11 +328,6 @@ class MemberBuilder( builder.append("@kotlin.internal.InlineOnly").append('\n') } - if (jvmOnly) { - builder.append("@kotlin.jvm.JvmVersion").append('\n') - } - - listOfNotNull( visibility ?: "public", "expect".takeIf { headerOnly },