[erlang-bugs] Dialyzer error on supervisor:init spec in R15

Jay Nelson <>
Tue Mar 6 06:29:18 CET 2012


My example is available as a rebar project at http://github.com/duomark/dk_yaws:

make dialyze
==> meck (compile)
==> rel (compile)
==> yaws (compile)
==> dk_yaws (compile)
dialyzer -Wrace_conditions ebin
  Checking whether the PLT /Users/jay/.dialyzer_plt is up-to-date... yes
  Proceeding with analysis...
dk_yaws_sup.erl:47: The return type {'ok',{tuple(),[any()]}} in the specification of init/1 is not a subtype of 'ignore' | {'ok',{{'one_for_all',non_neg_integer(),non_neg_integer()} | {'one_for_one',non_neg_integer(),non_neg_integer()} | {'rest_for_one',non_neg_integer(),non_neg_integer()} | {'simple_one_for_one',non_neg_integer(),non_neg_integer()},[{_,{atom() | tuple(),atom(),'undefined' | [any()]},'permanent' | 'temporary' | 'transient','brutal_kill' | 'infinity' | non_neg_integer(),'supervisor' | 'worker','dynamic' | [atom() | tuple()]}]}}, which is the expected return type for the callback of supervisor behaviour
Unknown functions:
  yaws_api:embedded_start_conf/4
  yaws_api:setconf/2
 done in 0m0.96s
done (warnings were emitted)


This problem can be recreated with a simple supervisor:init spec, pasted
into any handy supervisor:init you have laying around:

-spec init(Args::{}) -> {ok, {tuple(), list()}}.

When I try it with R14B03, there are no errors.
On R15B I get the above error.

jay



More information about the erlang-bugs mailing list