Add a note about *Raw functions behavior.
This commit is contained in:
@@ -437,6 +437,7 @@ public operator fun ShortArray.contains(element: Short): Boolean {
|
||||
|
||||
/**
|
||||
* Returns `true` if [element] is found in the collection.
|
||||
* Allows to overcome type-safety restriction of `contains` that requires to pass an element of type `T`.
|
||||
*/
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
public inline fun <T> Array<out T>.containsRaw(element: Any?): Boolean {
|
||||
@@ -1524,6 +1525,7 @@ public inline fun ShortArray.indexOfLast(predicate: (Short) -> Boolean): Int {
|
||||
|
||||
/**
|
||||
* Returns first index of [element], or -1 if the collection does not contain element.
|
||||
* Allows to overcome type-safety restriction of `indexOf` that requires to pass an element of type `T`.
|
||||
*/
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
public inline fun <T> Array<out T>.indexOfRaw(element: Any?): Int {
|
||||
@@ -1846,6 +1848,7 @@ public fun ShortArray.lastIndexOf(element: Short): Int {
|
||||
|
||||
/**
|
||||
* Returns last index of [element], or -1 if the collection does not contain element.
|
||||
* Allows to overcome type-safety restriction of `lastIndexOf` that requires to pass an element of type `T`.
|
||||
*/
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
public inline fun <T> Array<out T>.lastIndexOfRaw(element: Any?): Int {
|
||||
|
||||
Reference in New Issue
Block a user