[erlang-bugs] inet:ntoa/1 incorrect typespec

Max Treskin <>
Tue Dec 24 12:44:34 CET 2013


inet:ntoa/1 has following typespec:

-spec ntoa(IpAddress) ->
   {ok, Address} | {error, einval} when
      Address :: string(),
      IpAddress :: ip_address().
ntoa(Addr) ->

but inet_parse:ntoa/1 returns only:

 string() | {error, einval}

there is no tagged tuple {ok, string()}

This error also exists in inet man page due to incorrect typespec.
Is it possible to check kernel and stdlib with dialyzer?

Max Treskin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20131224/f2cbf175/attachment.html>

More information about the erlang-bugs mailing list