Generate extensions for unsigned arrays and provide tests for them

- contentEquals, contentToString, contentHashCode
- as[Signed]Array, as[Unsigned]Array
- to[Signed]Array, to[Unsigned]Array
- toTypedArray
- copyOf(), copyOf(newSize), copyOfRange(...)
This commit is contained in:
Ilya Gorbunov
2018-08-15 19:43:29 +03:00
parent 6360cc3cb5
commit 4df665bc78
5 changed files with 876 additions and 78 deletions
@@ -1126,6 +1126,6 @@ public actual fun BooleanArray.toTypedArray(): Array<Boolean> {
* Returns a *typed* object array containing all of the elements of this primitive array.
*/
public actual fun CharArray.toTypedArray(): Array<Char> {
return Array<Char>(size, { i -> this[i] })
return Array(size) { index -> this[index] }
}