@Override
  public void visitIdentifier(@NotNull PsiIdentifier identifier) {
    PsiElement parent = identifier.getParent();
    if (parent instanceof PsiVariable variable) {
      if (variable instanceof PsiField field) {
        add(HighlightClassUtil.checkImplicitClassMember(field, myLanguageLevel, myFile));
      }
      add(HighlightUtil.checkVariableAlreadyDefined(variable));
      if (variable.isUnnamed()) {
        HighlightInfo.Builder notAvailable = checkFeature(variable, JavaFeature.UNNAMED_PATTERNS_AND_VARIABLES);
        if (notAvailable != null) {
          add(notAvailable);
        } else {
          add(HighlightUtil.checkUnnamedVariableDeclaration(variable));
        }
      }

      if (variable.getInitializer() == null) {
        PsiElement child = variable.getLastChild();
        if (child instanceof PsiErrorElement && child.getPrevSibling() == identifier) return;
      }
    }
    else if (parent instanceof PsiClass aClass) {
      if (aClass.isAnnotationType()) {
        add(checkFeature(identifier, JavaFeature.ANNOTATIONS));
      }

      add(HighlightClassUtil.checkClassAlreadyImported(aClass, identifier));
      if (!hasErrorResults()) {
        add(HighlightClassUtil.checkClassRestrictedKeyword(myLanguageLevel, identifier));
      }
      if (!hasErrorResults() && JavaFeature.EXTENSION_METHODS.isSufficient(myLanguageLevel)) {
        add(GenericsHighlightUtil.checkUnrelatedDefaultMethods(aClass, identifier));
      }

      if (!hasErrorResults()) {
        add(GenericsHighlightUtil.checkUnrelatedConcrete(aClass, identifier));
      }
    }
    else if (parent instanceof PsiMethod method) {
      add(HighlightClassUtil.checkImplicitClassMember(method, myLanguageLevel, myFile));
      if (method.isConstructor()) {
        HighlightInfo.Builder info = HighlightMethodUtil.checkConstructorName(method);
        if (info != null) {
          PsiType expectedType = myExpectedReturnTypes.computeIfAbsent(method, HighlightMethodUtil::determineReturnType);
          if (expectedType != null) {
            HighlightUtil.registerReturnTypeFixes(info, method, expectedType);
          }
        }
        add(info);
      }
      PsiClass aClass = method.getContainingClass();
      if (aClass != null) {
        add(GenericsHighlightUtil.checkDefaultMethodOverridesMemberOfJavaLangObject(myLanguageLevel, aClass, method, identifier));
      }
    }

    add(HighlightUtil.checkUnderscore(identifier, myLanguageLevel));

    super.visitIdentifier(identifier);
  }
@Override
  public void visitIdentifier(@NotNull PsiIdentifier identifier)