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