Add a note about *Raw functions behavior.

This commit is contained in:
Ilya Gorbunov
2015-10-16 23:34:27 +03:00
parent 8fd5677fe0
commit d1d0807229
6 changed files with 43 additions and 3 deletions
@@ -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 {