Replace sort with sorted.
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -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)
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user