Replace sort with sorted.

This commit is contained in:
Ilya Gorbunov
2015-09-30 21:27:31 +03:00
parent 389ea1b230
commit 37a0347669
50 changed files with 76 additions and 75 deletions
@@ -69,7 +69,7 @@ public abstract class AbstractPseudoValueTest : AbstractPseudocodeTest() {
.map { (it as? InstructionWithValue)?.outputValue }
.filterNotNull()
.filter { it.element == null }
.toSortedListBy { it.debugName }
.sortedBy { it.debugName }
val allValues = elementToValues.values() + unboundValues
if (allValues.isEmpty()) return
@@ -68,7 +68,7 @@ class LazyOperationsLog(
return groupedByOwner.map {
val (owner, records) = it
renderOwner(owner, records)
}.sortBy(stringSanitizer).join("\n").renumberObjects()
}.sortedBy(stringSanitizer).join("\n").renumberObjects()
}
/**
@@ -97,7 +97,7 @@ class LazyOperationsLog(
with (Printer(sb)) {
println(render(owner), " {")
indent {
records.map { renderRecord(it) }.sortBy(stringSanitizer).forEach {
records.map { renderRecord(it) }.sortedBy(stringSanitizer).forEach {
println(it)
}
}
@@ -58,6 +58,6 @@ private fun checkSorted(descriptors: Collection<DeclarationDescriptor>, declarat
UsefulTestCase.assertOrderedEquals(
"Members of $declaration should be sorted by serialization.",
descriptors,
descriptors.sortBy(MemberComparator.INSTANCE)
descriptors.sortedWith(MemberComparator.INSTANCE)
)
}