sortedByDescending { key } instead of sortedBy { -key }
This commit is contained in:
@@ -142,7 +142,7 @@ public fun <TElement : JetElement> createByPattern(pattern: String, vararg args:
|
||||
.flatMap { it.value }
|
||||
.map { it.range }
|
||||
.filterNot { it.isEmpty() }
|
||||
.sortedBy { -it.getStartOffset() }
|
||||
.sortedByDescending { it.startOffset }
|
||||
|
||||
// reformat whole text except for String arguments (as they can contain user's formatting to be preserved)
|
||||
if (stringPlaceholderRanges.none()) {
|
||||
|
||||
@@ -143,7 +143,7 @@ class OverloadReducer(
|
||||
private fun dropOverloadsForDefaultValues(equivalenceMap: Map<PsiMethod, EquivalentOverloadInfo>) {
|
||||
val dropCandidates = equivalenceMap
|
||||
.map { it.key }
|
||||
.sortedBy { -it.getParameterList().getParametersCount() } // we will try to drop them starting from ones with more parameters
|
||||
.sortedByDescending { it.parameterList.parametersCount } // we will try to drop them starting from ones with more parameters
|
||||
|
||||
DropCandidatesLoop@
|
||||
for (method in dropCandidates) {
|
||||
|
||||
Reference in New Issue
Block a user