Temporary fix for NI to compile against bootstrap compiler

This commit is contained in:
Mikhail Zarechenskiy
2019-03-26 22:51:20 +03:00
parent a50cc99b01
commit 791ab05e08
2 changed files with 2 additions and 2 deletions
@@ -372,7 +372,7 @@ infix fun DaemonJVMOptions.memorywiseFitsInto(other: DaemonJVMOptions): Boolean
.all { (it.get(this).memToBytes() ?: 0) <= (it.get(other).memToBytes() ?: 0) }
fun compareDaemonJVMOptionsMemory(left: DaemonJVMOptions, right: DaemonJVMOptions): Int {
val props = daemonJVMOptionsMemoryProps.map { Pair(it.get(left).memToBytes() ?: 0, it.get(right).memToBytes() ?: 0) }
val props = daemonJVMOptionsMemoryProps.map { Pair<Long, Long>(it.get(left).memToBytes() ?: 0, it.get(right).memToBytes() ?: 0) }
return when {
props.all { it.first == it.second } -> 0
props.all { it.first <= it.second } -> -1
@@ -112,7 +112,7 @@ open class OverloadingConflictResolver<C : Any>(
fun filterOutEquivalentCalls(candidates: Collection<C>): Set<C> {
candidates.setIfOneOrEmpty()?.let { return it }
val fromSourcesGoesFirst = candidates.sortedBy { if (isFromSources(it.resultingDescriptor)) 0 else 1 }
val fromSourcesGoesFirst = candidates.sortedBy<C, Int> { if (isFromSources(it.resultingDescriptor)) 0 else 1 }
val result = LinkedHashSet<C>()
outerLoop@ for (meD in fromSourcesGoesFirst) {