getUseScope() fixed for destructuring declarations #KT-14181 Fixed
This commit is contained in:
@@ -142,7 +142,7 @@ public class KtDestructuringDeclarationEntry extends KtNamedDeclarationNotStubbe
|
|||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public SearchScope getUseScope() {
|
public SearchScope getUseScope() {
|
||||||
KtElement enclosingBlock = KtPsiUtil.getEnclosingElementForLocalDeclaration(this, false);
|
KtElement enclosingBlock = KtPsiUtil.getEnclosingElementForLocalDeclaration(this, true);
|
||||||
if (enclosingBlock != null) return new LocalSearchScope(enclosingBlock);
|
if (enclosingBlock != null) return new LocalSearchScope(enclosingBlock);
|
||||||
|
|
||||||
return super.getUseScope();
|
return super.getUseScope();
|
||||||
|
|||||||
@@ -796,7 +796,7 @@ public class KtPsiUtil {
|
|||||||
return (KtElement) parent;
|
return (KtElement) parent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (current instanceof KtBlockExpression || current instanceof KtParameter) {
|
if (current instanceof KtBlockExpression || (current instanceof KtParameter && !skipParameters)) {
|
||||||
return (KtElement) current;
|
return (KtElement) current;
|
||||||
}
|
}
|
||||||
if (current instanceof KtValueArgument) {
|
if (current instanceof KtValueArgument) {
|
||||||
|
|||||||
Reference in New Issue
Block a user