Fix function List<T>.reverse().
For now all iterables (including List) return reversed *copy* of collection. See Problem 3 at https://github.com/JetBrains/kotlin/pull/78#issuecomment-6533534
This commit is contained in:
@@ -245,7 +245,8 @@ public inline fun <C: Collection<Double>> DoubleArray.toCollection(result: C) :
|
||||
*/
|
||||
public inline fun DoubleArray.reverse() : List<Double> {
|
||||
val list = toList()
|
||||
return list.reverse()
|
||||
Collections.reverse(list)
|
||||
return list
|
||||
}
|
||||
|
||||
/** Copies all elements into a [[LinkedList]] */
|
||||
|
||||
Reference in New Issue
Block a user