private static PsiSubstitutor getCandidateInfoSubstitutor(CandidateInfo candidate, boolean resolveResult) {
    return candidate instanceof MethodCandidateInfo &&
           ((MethodCandidateInfo)candidate).isInferencePossible()
           ? ((MethodCandidateInfo)candidate)
             .inferTypeArguments(resolveResult ? DefaultParameterTypeInferencePolicy.INSTANCE
                                               : CompletionParameterTypeInferencePolicy.INSTANCE, true)
           : candidate.getSubstitutor();
  }
private static PsiSubstitutor getCandidateInfoSubstitutor(CandidateInfo candidate, boolean resolveResult)