boolean (@NotNull GrExpression expr) { PsiElement parent = expr.getParent(); if (parent instanceof GrClosableBlock) { return false; } if (parent instanceof GrField && expr == ((GrField)parent).getInitializerGroovy()) { return true; } if (parent instanceof GrExpression) { return checkInFieldInitializer(((GrExpression)parent)); } return false; }