Document that arrayOfNulls throws RuntimeException on negative size
This commit is contained in:
committed by
Space Team
parent
ffcc7dfca0
commit
1be0e3f70e
@@ -32,6 +32,8 @@ public operator fun String?.plus(other: Any?): String
|
||||
|
||||
/**
|
||||
* Returns an array of objects of the given type with the given [size], initialized with null values.
|
||||
*
|
||||
* @throws RuntimeException if the specified [size] is negative.
|
||||
*/
|
||||
public fun <reified @PureReifiable T> arrayOfNulls(size: Int): Array<T?>
|
||||
|
||||
|
||||
@@ -585,6 +585,8 @@ private class BooleanIteratorImpl(val collection: BooleanArray) : BooleanIterato
|
||||
|
||||
/**
|
||||
* Returns an array of objects of the given type with the given [size], initialized with null values.
|
||||
*
|
||||
* @throws RuntimeException if the specified [size] is negative.
|
||||
*/
|
||||
public inline fun <reified @PureReifiable T> arrayOfNulls(size: Int): Array<T?> =
|
||||
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||
|
||||
@@ -27,6 +27,8 @@ public operator fun String?.plus(other: Any?): String = (this ?: "null") + other
|
||||
|
||||
/**
|
||||
* Returns an array of objects of the given type with the given [size], initialized with null values.
|
||||
*
|
||||
* @throws RuntimeException if the specified [size] is negative.
|
||||
*/
|
||||
// TODO: Should T be reified?
|
||||
@Suppress("REIFIED_TYPE_PARAMETER_NO_INLINE")
|
||||
|
||||
Reference in New Issue
Block a user