kernel-2.13.3/pg2:get_closest_pid/1 spec is incorrect (R13B02)

View: New views
2 Messages — Rating Filter:   Alert me  

kernel-2.13.3/pg2:get_closest_pid/1 spec is incorrect (R13B02)

by Paul Guyot :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

In R13B02, pg2:get_closest_pid/1 has an incorrect spec. It says:  
(pg2.erl, line 144)

-spec get_closest_pid(term()) -> pid() | {'no_process', term()}
                                        | {'no_such_group', term()}.

It should be:

-spec get_closest_pid(term()) -> pid() | {'error', {'no_process', term
()}}
                                        | {'error', {'no_such_group',  
term()}}.

Paul

PS: I wish there was (I knew ?) a way dialyzer could figure these  
cases out.
--
Semiocast                       http://titema.com/
+33.175000290 - 62 bis rue Gay-Lussac, 75005 Paris


________________________________________________________________
erlang-bugs mailing list. See http://www.erlang.org/faq.html
erlang-bugs (at) erlang.org


Re: kernel-2.13.3/pg2:get_closest_pid/1 spec is incorrect (R13B02)

by Kostis Sagonas-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Paul Guyot wrote:

> Hello,
>
> In R13B02, pg2:get_closest_pid/1 has an incorrect spec. It says:
> (pg2.erl, line 144)
>
> -spec get_closest_pid(term()) -> pid() | {'no_process', term()}
>                                        | {'no_such_group', term()}.
>
> It should be:
>
> -spec get_closest_pid(term()) -> pid() | {'error', {'no_process', term()}}
>                                        | {'error', {'no_such_group',
> term()}}.

Thanks for reporting this one. It will be fixed in the upcoming release.

Kostis

________________________________________________________________
erlang-bugs mailing list. See http://www.erlang.org/faq.html
erlang-bugs (at) erlang.org