Remove obsolete JvmVersion annotation from generated functions

These functions are already generated in jvm-only file
This commit is contained in:
Ilya Gorbunov
2017-11-14 07:14:02 +03:00
parent 20c4775da0
commit eda8bbacb3
7 changed files with 0 additions and 63 deletions
-40
View File
@@ -6961,7 +6961,6 @@ public fun CharArray.toSet(): Set<Char> {
/**
* Returns a [SortedSet] of all elements.
*/
@kotlin.jvm.JvmVersion
public fun <T: Comparable<T>> Array<out T>.toSortedSet(): SortedSet<T> {
return toCollection(TreeSet<T>())
}
@@ -6969,7 +6968,6 @@ public fun <T: Comparable<T>> Array<out T>.toSortedSet(): SortedSet<T> {
/**
* Returns a [SortedSet] of all elements.
*/
@kotlin.jvm.JvmVersion
public fun ByteArray.toSortedSet(): SortedSet<Byte> {
return toCollection(TreeSet<Byte>())
}
@@ -6977,7 +6975,6 @@ public fun ByteArray.toSortedSet(): SortedSet<Byte> {
/**
* Returns a [SortedSet] of all elements.
*/
@kotlin.jvm.JvmVersion
public fun ShortArray.toSortedSet(): SortedSet<Short> {
return toCollection(TreeSet<Short>())
}
@@ -6985,7 +6982,6 @@ public fun ShortArray.toSortedSet(): SortedSet<Short> {
/**
* Returns a [SortedSet] of all elements.
*/
@kotlin.jvm.JvmVersion
public fun IntArray.toSortedSet(): SortedSet<Int> {
return toCollection(TreeSet<Int>())
}
@@ -6993,7 +6989,6 @@ public fun IntArray.toSortedSet(): SortedSet<Int> {
/**
* Returns a [SortedSet] of all elements.
*/
@kotlin.jvm.JvmVersion
public fun LongArray.toSortedSet(): SortedSet<Long> {
return toCollection(TreeSet<Long>())
}
@@ -7001,7 +6996,6 @@ public fun LongArray.toSortedSet(): SortedSet<Long> {
/**
* Returns a [SortedSet] of all elements.
*/
@kotlin.jvm.JvmVersion
public fun FloatArray.toSortedSet(): SortedSet<Float> {
return toCollection(TreeSet<Float>())
}
@@ -7009,7 +7003,6 @@ public fun FloatArray.toSortedSet(): SortedSet<Float> {
/**
* Returns a [SortedSet] of all elements.
*/
@kotlin.jvm.JvmVersion
public fun DoubleArray.toSortedSet(): SortedSet<Double> {
return toCollection(TreeSet<Double>())
}
@@ -7017,7 +7010,6 @@ public fun DoubleArray.toSortedSet(): SortedSet<Double> {
/**
* Returns a [SortedSet] of all elements.
*/
@kotlin.jvm.JvmVersion
public fun BooleanArray.toSortedSet(): SortedSet<Boolean> {
return toCollection(TreeSet<Boolean>())
}
@@ -7025,7 +7017,6 @@ public fun BooleanArray.toSortedSet(): SortedSet<Boolean> {
/**
* Returns a [SortedSet] of all elements.
*/
@kotlin.jvm.JvmVersion
public fun CharArray.toSortedSet(): SortedSet<Char> {
return toCollection(TreeSet<Char>())
}
@@ -7035,7 +7026,6 @@ public fun CharArray.toSortedSet(): SortedSet<Char> {
*
* Elements in the set returned are sorted according to the given [comparator].
*/
@kotlin.jvm.JvmVersion
public fun <T> Array<out T>.toSortedSet(comparator: Comparator<in T>): SortedSet<T> {
return toCollection(TreeSet<T>(comparator))
}
@@ -13784,7 +13774,6 @@ public fun CharArray.toTypedArray(): Array<Char> {
* 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 <T> Array<out T>.binarySearch(element: T, comparator: Comparator<in T>, fromIndex: Int = 0, toIndex: Int = size): Int {
return java.util.Arrays.binarySearch(this, fromIndex, toIndex, element, comparator)
}
@@ -13800,7 +13789,6 @@ public fun <T> Array<out T>.binarySearch(element: T, comparator: Comparator<in T
* 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 <T> Array<out T>.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 <T> Array<out T>.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 <T> Array<T>.fill(element: T, fromIndex: Int = 0, toIndex: Int = size): Unit {
java.util.Arrays.fill(this, fromIndex, toIndex, element)
}
@@ -13928,7 +13908,6 @@ public fun <T> Array<T>.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 <R> Array<*>.filterIsInstance(klass: Class<R>): List<R> {
return filterIsInstanceTo(ArrayList<R>(), klass)
}
@@ -14000,7 +13971,6 @@ public fun <R> Array<*>.filterIsInstance(klass: Class<R>): List<R> {
/**
* Appends all elements that are instances of specified class to the given [destination].
*/
@kotlin.jvm.JvmVersion
public fun <C : MutableCollection<in R>, R> Array<*>.filterIsInstanceTo(destination: C, klass: Class<R>): C {
@Suppress("UNCHECKED_CAST")
for (element in this) if (klass.isInstance(element)) destination.add(element as R)
@@ -14012,7 +13982,6 @@ public fun <C : MutableCollection<in R>, R> Array<*>.filterIsInstanceTo(destinat
*
* @throws ClassCastException if any element of the array is not [Comparable].
*/
@kotlin.jvm.JvmVersion
public fun <T> Array<out T>.sort(): Unit {
if (size > 1) java.util.Arrays.sort(this)
}
@@ -14020,7 +13989,6 @@ public fun <T> Array<out T>.sort(): Unit {
/**
* Sorts a range in the array in-place.
*/
@kotlin.jvm.JvmVersion
public fun <T> Array<out T>.sort(fromIndex: Int = 0, toIndex: Int = size): Unit {
java.util.Arrays.sort(this, fromIndex, toIndex)
}
@@ -14028,7 +13996,6 @@ public fun <T> Array<out T>.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 <T> Array<out T>.sortWith(comparator: Comparator<in T>, fromIndex: Int = 0, toIndex: Int = size): Unit {
java.util.Arrays.sort(this, fromIndex, toIndex, comparator)
}
@@ -1101,7 +1101,6 @@ public fun <T> Iterable<T>.toSet(): Set<T> {
/**
* Returns a [SortedSet] of all elements.
*/
@kotlin.jvm.JvmVersion
public fun <T: Comparable<T>> Iterable<T>.toSortedSet(): SortedSet<T> {
return toCollection(TreeSet<T>())
}
@@ -1111,7 +1110,6 @@ public fun <T: Comparable<T>> Iterable<T>.toSortedSet(): SortedSet<T> {
*
* Elements in the set returned are sorted according to the given [comparator].
*/
@kotlin.jvm.JvmVersion
public fun <T> Iterable<T>.toSortedSet(comparator: Comparator<in T>): SortedSet<T> {
return toCollection(TreeSet<T>(comparator))
}
@@ -2358,7 +2356,6 @@ public fun Iterable<Double>.sum(): Double {
/**
* Returns a list containing all elements that are instances of specified class.
*/
@kotlin.jvm.JvmVersion
public fun <R> Iterable<*>.filterIsInstance(klass: Class<R>): List<R> {
return filterIsInstanceTo(ArrayList<R>(), klass)
}
@@ -2366,7 +2363,6 @@ public fun <R> Iterable<*>.filterIsInstance(klass: Class<R>): List<R> {
/**
* Appends all elements that are instances of specified class to the given [destination].
*/
@kotlin.jvm.JvmVersion
public fun <C : MutableCollection<in R>, R> Iterable<*>.filterIsInstanceTo(destination: C, klass: Class<R>): C {
@Suppress("UNCHECKED_CAST")
for (element in this) if (klass.isInstance(element)) destination.add(element as R)
@@ -679,7 +679,6 @@ public fun <T> Sequence<T>.toSet(): Set<T> {
*
* The operation is _terminal_.
*/
@kotlin.jvm.JvmVersion
public fun <T: Comparable<T>> Sequence<T>.toSortedSet(): SortedSet<T> {
return toCollection(TreeSet<T>())
}
@@ -691,7 +690,6 @@ public fun <T: Comparable<T>> Sequence<T>.toSortedSet(): SortedSet<T> {
*
* The operation is _terminal_.
*/
@kotlin.jvm.JvmVersion
public fun <T> Sequence<T>.toSortedSet(comparator: Comparator<in T>): SortedSet<T> {
return toCollection(TreeSet<T>(comparator))
}
@@ -1856,7 +1854,6 @@ public fun Sequence<Double>.sum(): Double {
/**
* Returns a sequence containing all elements that are instances of specified class.
*/
@kotlin.jvm.JvmVersion
public fun <R> Sequence<*>.filterIsInstance(klass: Class<R>): Sequence<R> {
@Suppress("UNCHECKED_CAST")
return filter { klass.isInstance(it) } as Sequence<R>
@@ -1865,7 +1862,6 @@ public fun <R> Sequence<*>.filterIsInstance(klass: Class<R>): Sequence<R> {
/**
* Appends all elements that are instances of specified class to the given [destination].
*/
@kotlin.jvm.JvmVersion
public fun <C : MutableCollection<in R>, R> Sequence<*>.filterIsInstanceTo(destination: C, klass: Class<R>): C {
@Suppress("UNCHECKED_CAST")
for (element in this) if (klass.isInstance(element)) destination.add(element as R)
@@ -628,7 +628,6 @@ public fun CharSequence.toSet(): Set<Char> {
/**
* Returns a [SortedSet] of all characters.
*/
@kotlin.jvm.JvmVersion
public fun CharSequence.toSortedSet(): SortedSet<Char> {
return toCollection(TreeSet<Char>())
}
@@ -99,7 +99,6 @@ object Snapshots : TemplateGroupBase() {
include(CharSequences)
platforms(Platform.JVM)
} builder {
jvmOnly = true
typeParam("T: Comparable<T>")
doc { "Returns a [SortedSet] of all ${f.element.pluralize()}." }
returns("SortedSet<T>")
@@ -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()}.
@@ -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)
@@ -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 },