public boolean collectDependencies(@Nullable PsiType type,
                                     final @Nullable Set<? super InferenceVariable> dependencies) {
    return collectDependencies(type, dependencies, this::getInferenceVariable);
  }
public boolean collectDependencies(@Nullable PsiType type,
                                     final @Nullable Set<? super InferenceVariable> dependencies)