void (@NotNull GrAssignmentExpression grAssignmentExpression) { super.visitAssignmentExpression(grAssignmentExpression); final GrExpression lhs = grAssignmentExpression.getLValue(); if (!(lhs instanceof GrReferenceExpression)) { return; } final PsiElement referent = ((PsiReference) lhs).resolve(); if (referent == null) { return; } if (!(referent instanceof GrParameter)) { return; } final PsiElement parent = referent.getParent(); if (!(parent instanceof GrForClause)) { return; } if (parent instanceof GrTraditionalForClause && PsiTreeUtil.isAncestor(parent, grAssignmentExpression, true)) { return; } registerError(lhs); }