Fix exception when Java class has different methods with same erasure

^KT-36856 Fixed
This commit is contained in:
Denis Zharkov
2020-02-20 13:06:41 +03:00
parent 7efb32628e
commit 071149e0fb
8 changed files with 80 additions and 23 deletions
@@ -126,7 +126,7 @@ abstract class LazyJavaScope(
val groups = groupBy { it.computeJvmDescriptor(withReturnType = false) }.values
for (group in groups) {
if (group.size == 1) continue
val mostSpecificMethods = group.selectMostSpecificFromOverridableGroup()
val mostSpecificMethods = group.selectMostSpecificInEachOverridableGroup { this }
removeAll(group)
addAll(mostSpecificMethods)
}