Don't process Java references twice when looking for kotlin overrides (KT-17751)
This commit is contained in:
+9
-6
@@ -48,16 +48,19 @@ class KotlinOverridingMethodReferenceSearcher : MethodUsagesSearcher() {
|
||||
return
|
||||
}
|
||||
|
||||
super.processQuery(p, consumer)
|
||||
val searchScope = p.project.runReadActionInSmartMode {
|
||||
p.effectiveSearchScope
|
||||
.intersectWith(method.useScope)
|
||||
.restrictToKotlinSources()
|
||||
}
|
||||
|
||||
if (searchScope === GlobalSearchScope.EMPTY_SCOPE) return
|
||||
|
||||
super.processQuery(MethodReferencesSearch.SearchParameters(method, searchScope, p.isStrictSignatureSearch, p.optimizer), consumer)
|
||||
|
||||
p.project.runReadActionInSmartMode {
|
||||
val containingClass = method.containingClass ?: return@runReadActionInSmartMode
|
||||
|
||||
val searchScope = p.effectiveSearchScope
|
||||
.intersectWith(method.useScope)
|
||||
.restrictToKotlinSources()
|
||||
if (searchScope === GlobalSearchScope.EMPTY_SCOPE) return@runReadActionInSmartMode
|
||||
|
||||
val nameCandidates = getPropertyNamesCandidatesByAccessorName(Name.identifier(method.name))
|
||||
for (name in nameCandidates) {
|
||||
p.optimizer.searchWord(
|
||||
|
||||
Reference in New Issue
Block a user