@Nullable
  static HighlightInfo.Builder checkDuplicateClasses(@NotNull PsiJavaFile file) {
    if (!PsiUtil.isAvailable(JavaFeature.IMPLICIT_CLASSES, file)) return null;
    PsiImplicitClass implicitClass = JavaImplicitClassUtil.getImplicitClassFor(file);
    if (implicitClass == null) return null;

    Module module = ModuleUtilCore.findModuleForPsiElement(file);
    if (module == null) return null;

    GlobalSearchScope scope = GlobalSearchScope.moduleScope(module).intersectWith(implicitClass.getResolveScope());
    String qualifiedName = implicitClass.getQualifiedName();
    if (qualifiedName == null) {
      return null;
    }
    PsiClass[] classes = JavaPsiFacade.getInstance(implicitClass.getProject()).findClasses(qualifiedName, scope);
    return HighlightClassUtil.checkDuplicateClasses(implicitClass, classes);
  }
@Nullable
  static HighlightInfo.Builder checkDuplicateClasses(@NotNull PsiJavaFile file)