Find Usages: Use isEquivalentTo() instead of identity equality when matching references with PsiCompiledElement

This commit is contained in:
Alexey Sedunov
2015-05-22 17:22:13 +03:00
parent b2201026d1
commit b7277cd80c
@@ -69,7 +69,8 @@ public fun PsiReference.matchesTarget(candidateTarget: PsiElement): Boolean {
}
val targets = unwrappedTargets
if (unwrappedCandidate in targets) return true
// TODO: Investigate why PsiCompiledElement identity changes
if (targets.any { it.isEquivalentTo(unwrappedCandidate) }) return true
if (this is JetReference) {
return targets.any {