Document that arrayOfNulls throws RuntimeException on negative size

This commit is contained in:
Abduqodiri Qurbonzoda
2023-06-17 09:50:12 +03:00
committed by Space Team
parent ffcc7dfca0
commit 1be0e3f70e
3 changed files with 6 additions and 0 deletions
+2
View File
@@ -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?>