elli-lib / elli

Simple, robust and performant Erlang web server
https://github.com/elli-lib/elli/blob/develop/doc/README.md
MIT License
314 stars 37 forks source link

Invalid spec for elli:stop/1 #111

Closed lud closed 5 days ago

lud commented 2 years ago

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.
paulo-ferraz-oliveira commented 2 years ago

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