Use the same implementation in Array.toArrayList as in arrayListOf.

This commit is contained in:
Ilya Gorbunov
2015-10-16 19:16:29 +03:00
parent 55122cda9e
commit e24af934dc
3 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -5160,7 +5160,7 @@ public fun Array<out Short>.toShortArray(): ShortArray {
* Returns an [ArrayList] of all elements.
*/
public fun <T> Array<out T>.toArrayList(): ArrayList<T> {
return this.asList().toArrayList()
return ArrayList(this.asCollection())
}
/**