Drop deprecations: *Raw functions.
This commit is contained in:
@@ -436,26 +436,6 @@ public operator fun ShortArray.contains(element: Short): Boolean {
|
||||
return indexOf(element) >= 0
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns `true` if [element] is found in the collection.
|
||||
*/
|
||||
@Deprecated("Array and element have incompatible types. Upcast element to Any? if you're sure.", ReplaceWith("contains(element as T)"))
|
||||
@kotlin.jvm.JvmName("containsAny")
|
||||
@kotlin.internal.LowPriorityInOverloadResolution
|
||||
public operator fun <T> Array<out T>.contains(element: T): Boolean {
|
||||
return contains(element as T)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns `true` if [element] is found in the array.
|
||||
* Allows to overcome type-safety restriction of `contains` that requires to pass an element of type `T`.
|
||||
*/
|
||||
@Deprecated("Array and element have incompatible types. Upcast element to Any? if you're sure.", ReplaceWith("contains(element as Any?)"))
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
public inline fun <T> Array<out T>.containsRaw(element: Any?): Boolean {
|
||||
return contains(element as Any?)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this array.
|
||||
*/
|
||||
@@ -1319,17 +1299,6 @@ public fun ShortArray.indexOf(element: Short): Int {
|
||||
return -1
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns first index of [element], or -1 if the collection does not contain element.
|
||||
*/
|
||||
@Deprecated("Array and element have incompatible types. Upcast element to Any? if you're sure.", ReplaceWith("indexOf(element as T)"))
|
||||
@kotlin.jvm.JvmName("indexOfAny")
|
||||
@kotlin.internal.LowPriorityInOverloadResolution
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
public fun <T> Array<out T>.indexOf(element: T): Int {
|
||||
return indexOf(element as T)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns index of the first element matching the given [predicate], or -1 if the array does not contain such element.
|
||||
*/
|
||||
@@ -1546,16 +1515,6 @@ public inline fun ShortArray.indexOfLast(predicate: (Short) -> Boolean): Int {
|
||||
return -1
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns first index of [element], or -1 if the array does not contain element.
|
||||
* Allows to overcome type-safety restriction of `indexOf` that requires to pass an element of type `T`.
|
||||
*/
|
||||
@Deprecated("Array and element have incompatible types. Upcast element to Any? if you're sure.", ReplaceWith("indexOf(element as Any?)"))
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
public inline fun <T> Array<out T>.indexOfRaw(element: Any?): Int {
|
||||
return indexOf(element as Any?)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the last element.
|
||||
* @throws [NoSuchElementException] if the array is empty.
|
||||
@@ -1870,27 +1829,6 @@ public fun ShortArray.lastIndexOf(element: Short): Int {
|
||||
return -1
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns last index of [element], or -1 if the collection does not contain element.
|
||||
*/
|
||||
@Deprecated("Array and element have incompatible types. Upcast element to Any? if you're sure.", ReplaceWith("lastIndexOf(element as T)"))
|
||||
@kotlin.jvm.JvmName("lastIndexOfAny")
|
||||
@kotlin.internal.LowPriorityInOverloadResolution
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
public fun <T> Array<out T>.lastIndexOf(element: T): Int {
|
||||
return lastIndexOf(element as T)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns last index of [element], or -1 if the array does not contain element.
|
||||
* Allows to overcome type-safety restriction of `lastIndexOf` that requires to pass an element of type `T`.
|
||||
*/
|
||||
@Deprecated("Array and element have incompatible types. Upcast element to Any? if you're sure.", ReplaceWith("lastIndexOf(element as Any?)"))
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
public inline fun <T> Array<out T>.lastIndexOfRaw(element: Any?): Int {
|
||||
return lastIndexOf(element as Any?)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the last element, or `null` if the array is empty.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user