From bf56f043688e0bda9b20226483529edf00559e61 Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Tue, 13 Sep 2016 18:45:47 +0300 Subject: [PATCH] Simplify Kotlin.collectionsSort as it always being provided with MutableList. --- js/js.translator/testData/kotlin_lib.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/js/js.translator/testData/kotlin_lib.js b/js/js.translator/testData/kotlin_lib.js index 4c7f4da47cc..e5d13e14da8 100644 --- a/js/js.translator/testData/kotlin_lib.js +++ b/js/js.translator/testData/kotlin_lib.js @@ -781,12 +781,7 @@ boundComparator = comparator.compare.bind(comparator); } - if (mutableList instanceof Array) { - mutableList.sort(boundComparator); - } - if (mutableList.size > 1) { - //TODO: should be deleted when List will be JS Array-like (https://developer.mozilla.org/en-US/docs/JavaScript/Guide/Predefined_Core_Objects#Working_with_Array-like_objects) var array = Kotlin.copyToArray(mutableList); array.sort(boundComparator);