Rename: Rename do-while loop variables in the loop condition
#KT-14157 Fixed
This commit is contained in:
@@ -103,7 +103,18 @@ abstract class KtNamedDeclarationStub<T extends KotlinStubWithFqName<?>> extends
|
||||
@Override
|
||||
public SearchScope getUseScope() {
|
||||
KtElement enclosingBlock = KtPsiUtil.getEnclosingElementForLocalDeclaration(this, false);
|
||||
if (enclosingBlock != null) return new LocalSearchScope(enclosingBlock);
|
||||
if (enclosingBlock != null) {
|
||||
PsiElement enclosingParent = enclosingBlock.getParent();
|
||||
if (enclosingParent instanceof KtContainerNode) {
|
||||
enclosingParent = enclosingParent.getParent();
|
||||
}
|
||||
if (enclosingBlock instanceof KtBlockExpression && enclosingParent instanceof KtDoWhileExpression) {
|
||||
KtExpression condition = ((KtDoWhileExpression) enclosingParent).getCondition();
|
||||
if (condition != null) return new LocalSearchScope(new PsiElement[] { enclosingBlock, condition });
|
||||
}
|
||||
|
||||
return new LocalSearchScope(enclosingBlock);
|
||||
}
|
||||
|
||||
if (hasModifier(KtTokens.PRIVATE_KEYWORD)) {
|
||||
KtElement containingClass = PsiTreeUtil.getParentOfType(this, KtClassOrObject.class);
|
||||
|
||||
Reference in New Issue
Block a user