Fix fast-path check when selecting most specific members

Obviously 'overridableGroup' cannot be both empty and having the single element.
'conflictedHandles' that is what meant to be empty instead
This commit is contained in:
Denis Zharkov
2016-12-06 10:28:16 +03:00
parent 83056c71c9
commit a52ae04aef
@@ -61,7 +61,7 @@ fun <H : Any> Collection<H>.selectMostSpecificInEachOverridableGroup(
val overridableGroup =
OverridingUtil.extractMembersOverridableInBothWays(nextHandle, queue, descriptorByHandle) { conflictedHandles.add(it) }
if (overridableGroup.size == 1 && overridableGroup.isEmpty()) {
if (overridableGroup.size == 1 && conflictedHandles.isEmpty()) {
result.add(overridableGroup.single())
continue
}