STDLIB: added emptyArray()

This commit is contained in:
Vasily Levchenko
2017-03-15 14:00:26 +03:00
committed by vvlevchenko
parent c9b04bc0bb
commit 5215a9b60b
+4
View File
@@ -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>
private val kEmptyArray = arrayOf<Any>()
public fun <T> emptyArray() = kEmptyArray as Array<T>
/**
* Returns an array containing the specified [Double] numbers.
*/