Use Array constructor with size to create Array of nulls
Change the constructor visibility from public to private as it should be.
This commit is contained in:
committed by
Space Team
parent
a6520a294b
commit
77491ded1b
@@ -30,7 +30,7 @@ public operator fun String?.plus(other: Any?): String = (this ?: "null") + other
|
||||
*/
|
||||
// TODO: Should T be reified?
|
||||
@Suppress("REIFIED_TYPE_PARAMETER_NO_INLINE")
|
||||
public fun <@PureReifiable reified T> arrayOfNulls(size: Int): Array<T?> = Array(size) { null }
|
||||
public fun <@PureReifiable reified T> arrayOfNulls(size: Int): Array<T?> = Array(size)
|
||||
|
||||
/**
|
||||
* Returns an array containing the specified elements.
|
||||
|
||||
Reference in New Issue
Block a user