@NotNull
  public PsiSubstitutor inferTypeArguments(@NotNull final ParameterTypeInferencePolicy policy,
                                           final PsiExpression @NotNull [] arguments,
                                           boolean includeReturnConstraint) {
    final Computable<PsiSubstitutor> computable = () -> {
      final PsiMethod method = getElement();
      PsiTypeParameter[] typeParameters = method.getTypeParameters();

      if (isRawSubstitution()) {
        return JavaPsiFacade.getElementFactory(method.getProject()).createRawSubstitutor(mySubstitutor, typeParameters);
      }

      final PsiElement parent = getParent();
      if (parent == null) return PsiSubstitutor.EMPTY;
      Project project = method.getProject();
      JavaPsiFacade javaPsiFacade = JavaPsiFacade.getInstance(project);
      return javaPsiFacade.getResolveHelper()
        .inferTypeArguments(typeParameters, method.getParameterList().getParameters(), arguments, this, parent, policy,
                            myLanguageLevel);
    };
    if (!includeReturnConstraint) {
      return myArgumentList == null
             ? PsiSubstitutor.EMPTY
             : Objects.requireNonNull(ourOverloadGuard.doPreventingRecursion(myArgumentList, false, computable));
    }
    else {
      return computable.compute();
    }
  }
@NotNull
  public PsiSubstitutor inferTypeArguments(@NotNull final ParameterTypeInferencePolicy policy,
                                           final PsiExpression @NotNull [] arguments,
                                           boolean includeReturnConstraint)