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
@@ -57,7 +57,7 @@ fun snapshots(): List<GenericFunction> {
}
body(Collections) { "return ArrayList(this)" }
body(Strings) { "return toCollection(ArrayList<T>(length()))" }
body(ArraysOfObjects) { "return this.asList().toArrayList()" }
body(ArraysOfObjects) { "return ArrayList(this.asCollection())" }
body(ArraysOfPrimitives) {
"""
val list = ArrayList<T>(size())