elli icon indicating copy to clipboard operation
elli copied to clipboard

Invalid spec for elli:stop/1

Open lud opened this issue 2 years ago • 1 comments

The current spec is:

%% @doc Stop `Server'.
-spec stop(Server :: atom()) -> {stop, normal, ok, state()}.
stop(S) ->
    gen_server:call(S, stop).

Shouldn't it be just:

-spec stop(Server :: atom() | pid()) -> ok.

lud avatar Feb 24 '22 09:02 lud

It should. dialyzer isn't able to pick it up because the execution sits behind gen_server.

paulo-ferraz-oliveira avatar Feb 24 '22 11:02 paulo-ferraz-oliveira