67410f7a57
The changes introduced471134d31eare only needed for the case of HMPP project while for other cases it might break the behavior a bit like in KT-34027 See org.jetbrains.kotlin.resolve.calls.results.OverloadingConflictResolver#filterOutEquivalentCalls Before471134dwe were comparing "fun foo(x: String)" with "[substituted] fun foo(x: String)" and areCallableDescriptorsEquivalent returned false for such case. Thus, both overrides were left in the resulting set. After471134d, those two descriptors becamed considered as equal thus having a possibility to remove any of them. The problem is that "areCallableDescriptorsEquivalent" has kind of unclear contract. Effectively it checks whether two descriptors match to the same declaration But straightforward fixing of this exact call-site (using original descriptors) doesn't help: behavior might change in a very subtle way (see org.jetbrains.kotlin.spec.checkers.DiagnosticsTestSpecGenerated.NotLinked.Dfa.Pos#test72) So, the main idea is changing the contract for areCallableDescriptorsEquivalent only when project is HMPP one. ^KT-34027 In Progress