Add missing unsigned array constructors (from size)

#KT-25961 Fixed
This commit is contained in:
Ilya Gorbunov
2018-07-04 20:07:11 +03:00
parent 282cf73aff
commit f9479d12f9
7 changed files with 94 additions and 4 deletions
@@ -14,6 +14,9 @@ public inline class UByteArray
@PublishedApi
internal constructor(private val storage: ByteArray) : Collection<UByte> {
/** Creates a new array of the specified [size], with all elements initialized to zero. */
public constructor(size: Int) : this(ByteArray(size))
/** Returns the array element at the given [index]. This method can be called using the index operator. */
public operator fun get(index: Int): UByte = storage[index].toUByte()