void (PsiConditionalLoopStatement loop) { PsiStatement body = loop.getBody(); if (!PsiTreeUtil.isAncestor(body, referenceExpression, true)) return; if (isReassignedInside(body)) return; checkExpression(loop.getCondition()); }