JS: drop Collections.reverse and java.util.Collections altogether

This commit is contained in:
Alexander Udalov
2016-11-02 12:35:23 +03:00
parent e8fecea871
commit 3db459c1d8
5 changed files with 19 additions and 15 deletions
@@ -1,3 +1,5 @@
// WITH_RUNTIME
import java.util.*
class ArrayWrapper<T>() {
@@ -10,7 +12,7 @@ class ArrayWrapper<T>() {
operator fun unaryMinus(): ArrayWrapper<T> {
val result = ArrayWrapper<T>()
result.contents.addAll(contents)
Collections.reverse(result.contents)
result.contents.reverse()
return result
}