don't go outside of file when trying to find enclosing element for declaration
This commit is contained in:
@@ -792,6 +792,10 @@ public class JetPsiUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (declaration instanceof PsiFile) {
|
||||||
|
return declaration;
|
||||||
|
}
|
||||||
|
|
||||||
// No appropriate stub-tolerant method in PsiTreeUtil, nor JetStubbedPsiUtil, writing manually
|
// No appropriate stub-tolerant method in PsiTreeUtil, nor JetStubbedPsiUtil, writing manually
|
||||||
PsiElement current = PsiTreeUtil.getStubOrPsiParent(declaration);
|
PsiElement current = PsiTreeUtil.getStubOrPsiParent(declaration);
|
||||||
while (current != null) {
|
while (current != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user