mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-03-22 15:51:33 +00:00
Misc: Do not use empty scope for KtParameter/KtTypeParameter (possible fix for EA-1185336)
This commit is contained in:
@@ -20,7 +20,6 @@ import com.intellij.lang.ASTNode;
|
||||
import com.intellij.navigation.ItemPresentation;
|
||||
import com.intellij.navigation.ItemPresentationProviders;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.search.GlobalSearchScope;
|
||||
import com.intellij.psi.search.LocalSearchScope;
|
||||
import com.intellij.psi.search.SearchScope;
|
||||
import com.intellij.psi.tree.TokenSet;
|
||||
@@ -192,6 +191,6 @@ public class KtParameter extends KtNamedDeclarationStub<KotlinParameterStub> imp
|
||||
if (owner == null) {
|
||||
owner = PsiTreeUtil.getParentOfType(this, KtExpression.class);
|
||||
}
|
||||
return owner != null ? new LocalSearchScope(owner) : GlobalSearchScope.EMPTY_SCOPE;
|
||||
return new LocalSearchScope(owner != null ? owner : this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,6 +91,6 @@ public class KtTypeParameter extends KtNamedDeclarationStub<KotlinTypeParameterS
|
||||
@Override
|
||||
public SearchScope getUseScope() {
|
||||
KtTypeParameterListOwner owner = PsiTreeUtil.getParentOfType(this, KtTypeParameterListOwner.class);
|
||||
return owner != null ? new LocalSearchScope(owner) : GlobalSearchScope.EMPTY_SCOPE;
|
||||
return new LocalSearchScope(owner != null ? owner : this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user