@Override
  public PsiType inferTypeForMethodTypeParameter(final @NotNull PsiTypeParameter typeParameter,
                                                 final PsiParameter @NotNull [] parameters,
                                                 PsiExpression @NotNull [] arguments,
                                                 @NotNull PsiSubstitutor partialSubstitutor,
                                                 PsiElement parent,
                                                 final @NotNull ParameterTypeInferencePolicy policy) {

    final Pair<PsiType, ConstraintType> constraint =
      inferTypeForMethodTypeParameterInner(typeParameter, parameters, arguments, partialSubstitutor, parent, policy);
    if (constraint == null) return PsiTypes.nullType();
    return constraint.getFirst();
  }
@Override
  public PsiType inferTypeForMethodTypeParameter(final @NotNull PsiTypeParameter typeParameter,
                                                 final PsiParameter @NotNull [] parameters,
                                                 PsiExpression @NotNull [] arguments,
                                                 @NotNull PsiSubstitutor partialSubstitutor,
                                                 PsiElement parent,
                                                 final @NotNull ParameterTypeInferencePolicy policy)