Because of this erroneous spec, Dialyzer complains when I use TOML:
lib/drink/toml.ex:10:pattern_match
The pattern can never match the type.
Pattern:
{:error, :enoent}
Type:
{:error, %{:__exception__ => true, :__struct__ => atom(), atom() => _}}
________________________________________________________________________________
As seen above parse_filecan return {:error, :enoent}.
The documentation says that
parse_file
can return{:ok, …}
or{:error, [Exception.t]}
. But, apparently,parse_file
can also return{:error, atom}
:Because of this erroneous spec, Dialyzer complains when I use TOML:
As seen above
parse_file
can return{:error, :enoent}
.