don't check intention availability on PsiFile (EA-85587 - assert: SharedPsiElementImplUtil.getChildIndex)

This commit is contained in:
Dmitry Jemerov
2016-07-05 18:58:47 +02:00
parent d21061ff60
commit 8632790446
@@ -66,7 +66,7 @@ abstract class SelfTargetingIntention<TElement : PsiElement>(
if (leaf2 != null) {
elementsToCheck += leaf2.parentsWithSelf.takeWhile { it != commonParent }
}
if (commonParent != null) {
if (commonParent != null && commonParent !is PsiFile) {
elementsToCheck += commonParent.parentsWithSelf
}