Introduce plusElement and minusElement to disambiguate situations like List<List<T>> + List<T>
#KT-9992 Fixed
This commit is contained in:
@@ -488,6 +488,14 @@ public inline operator fun ShortArray.plus(elements: ShortArray): ShortArray {
|
||||
return this.asDynamic().concat(elements)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array containing all elements of the original array and then the given [element].
|
||||
*/
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
public inline fun <T> Array<out T>.plusElement(element: T): Array<T> {
|
||||
return this.asDynamic().concat(arrayOf(element))
|
||||
}
|
||||
|
||||
/**
|
||||
* Sorts the array in-place.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user