bitwalker / bitwalker/libgraph

Might be better for Graph.topsort/1 to return :error and {:ok, sorted_graph}?

Open
#27 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Elixir
Stars
571
Forks
76
PR merge metrics
No merged PRs in 30d

Description

Dialyzer complains `The test [any()] == 'false' can never evaluate to 'true'` when I try to check the output of `Graph.topsort/1`. Apparently the typespec annotation confused it. I guess one could either change the return value to `:error | {:ok, sorted_graph}` or change the typespec so that Dialyzer doesn't find it problematic? Or am I doing something wrong here.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.