STDLIB: added emptyArray()
This commit is contained in:
committed by
vvlevchenko
parent
c9b04bc0bb
commit
5215a9b60b
@@ -2142,6 +2142,10 @@ public inline fun <reified T> Collection<T>.toTypedArray(): Array<T> {
|
|||||||
*/
|
*/
|
||||||
public inline fun <reified @PureReifiable T> arrayOf(vararg elements: T): Array<T> = elements as Array<T>
|
public inline fun <reified @PureReifiable T> arrayOf(vararg elements: T): Array<T> = elements as Array<T>
|
||||||
|
|
||||||
|
private val kEmptyArray = arrayOf<Any>()
|
||||||
|
|
||||||
|
public fun <T> emptyArray() = kEmptyArray as Array<T>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an array containing the specified [Double] numbers.
|
* Returns an array containing the specified [Double] numbers.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user