void (@NotNull GrField field) { PsiExpression initializer = field.getInitializer(); if (initializer == null) return; PsiClass containingClass = field.getContainingClass(); if (containingClass == null) return; PsiAnnotation tupleConstructor = containingClass.getAnnotation(GroovyCommonClassNames.GROOVY_TRANSFORM_TUPLE_CONSTRUCTOR); if (tupleConstructor == null) return; if (!Boolean.FALSE.equals(GrAnnotationUtil.inferBooleanAttribute(tupleConstructor, TupleConstructorAttributes.DEFAULTS))) return; AffectedMembersCache cache = GrGeneratedConstructorUtils.getAffectedMembersCache(tupleConstructor); if (!cache.arePropertiesHandledByUser() && cache.getAffectedMembers().contains(field)) { myHolder.newAnnotation(HighlightSeverity.ERROR, GroovyBundle.message("initializers.are.forbidden.with.defaults")) .range(initializer) .create(); } }