Introduce plusElement and minusElement to disambiguate situations like List<List<T>> + List<T>

#KT-9992 Fixed
This commit is contained in:
Ilya Gorbunov
2016-01-26 18:42:30 +03:00
parent fb21ef2e1d
commit 8d02467e6d
10 changed files with 134 additions and 0 deletions
@@ -12358,6 +12358,14 @@ public operator fun ShortArray.plus(elements: ShortArray): ShortArray {
return result
}
/**
* Returns an array containing all elements of the original array and then the given [element].
*/
@kotlin.jvm.JvmVersion
public fun <T> Array<T>.plusElement(element: T): Array<T> {
return plus(element)
}
/**
* Sorts the array in-place.
*/