boolean (@NotNull PsiMethod method) { if (PsiTypes.voidType().equals(method.getReturnType())) { return true; } if (method instanceof GrMethod && ((GrMethod)method).getReturnTypeElementGroovy() == null) { GrOpenBlock block = ((GrMethod)method).getBlock(); if (block != null && isBlockReturnVoid(block)) { return true; } } return false; }