static void checkAmbiguousConstructorCall(@NotNull Project project, PsiJavaCodeReferenceElement ref,
                                            PsiElement resolved,
                                            PsiElement parent,
                                            JavaSdkVersion version, @NotNull Consumer<? super HighlightInfo.Builder> errorSink) {
    if (resolved instanceof PsiClass psiClass &&
        parent instanceof PsiNewExpression newExpression && psiClass.getConstructors().length > 0) {
      if (newExpression.resolveMethod() == null && !PsiTreeUtil.findChildrenOfType(newExpression.getArgumentList(), PsiFunctionalExpression.class).isEmpty()) {
        PsiType type = newExpression.getType();
        if (type != null) {
          checkConstructorCall(project, ((PsiClassType)type).resolveGenerics(), newExpression, type, newExpression.getClassReference(), version, ref,
                               errorSink);
        }
      }
    }
  }
static void checkAmbiguousConstructorCall(@NotNull Project project, PsiJavaCodeReferenceElement ref,
                                            PsiElement resolved,
                                            PsiElement parent,
                                            JavaSdkVersion version, @NotNull Consumer<? super HighlightInfo.Builder> errorSink)