Document that array constructor throws RuntimeException on negative size

This commit is contained in:
Abduqodiri Qurbonzoda
2023-06-12 02:14:40 +03:00
committed by Space Team
parent 9f16daac02
commit da8f9fbd04
5 changed files with 95 additions and 7 deletions
+2
View File
@@ -19,6 +19,8 @@ public class Array<T> {
*
* The function [init] is called for each array element sequentially starting from the first one.
* It should return the value for an array element given its index.
*
* @throws RuntimeException if the specified [size] is negative.
*/
public inline constructor(size: Int, init: (Int) -> T)