void (@NotNull GrTypeParameterList list) { final PsiElement parent = list.getParent(); if (parent instanceof GrMethod && ((GrMethod)parent).isConstructor() || parent instanceof GrEnumTypeDefinition || parent instanceof GrAnnotationTypeDefinition) { myHolder.newAnnotation(HighlightSeverity.ERROR, GroovyBundle.message("type.parameters.are.unexpected")).create(); } }