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

Hans Bolinder hans.bolinder@REDACTED
Thu Feb 20 13:52:27 CET 2014


[Max Treskin:]
> inet:ntoa/1 has following typespec:
>
> -spec ntoa(IpAddress) ->
>    {ok, Address} | {error, einval} when
>       Address :: string(),
>       IpAddress :: ip_address().
> ntoa(Addr) ->
>     inet_parse:ntoa(Addr).
>
> but inet_parse:ntoa/1 returns only:
>
>  string() | {error, einval}
>
> there is no tagged tuple {ok, string()}

Thanks!

The bug will be fixed in Erlang/OTP 17.0.

Best regards,

Hans Bolinder, Erlang/OTP team, Ericsson

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140220/bdc6c036/attachment.htm>


More information about the erlang-bugs mailing list