Why does Dialyzer check only the first case of the function?
-spec f(integer()) -> integer().
f(0) -> 0;
f(_) -> test.
Proceeding with analysis... done in 0m0.25s done (passed successfully)
The version with "case" also passes the check:
-spec f(integer()) -> integer().
f(N) ->
case N of
0 -> 1;
_ -> test
end.
Dialyzer version is 4.4.3
missing_return
flag should catch this.