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

Stavros Aronis <>
Tue Mar 6 10:01:45 CET 2012

Hi Jay,

the warning does look hairy but is, nevertheless, valid. {tuple(), [any()]}
is not a subtype of the expected specification (interpret this as "at least
as strict as"). If you would like to use a generic specification that would
still keep Dialyzer happy you should instead write:

-spec init(Args::{}) ->

Unfortunately this will still give an error in R15B, because of a real bug
in Dialyzer. A patch for this has been already submitted and will soon be
available in the maint branch of erlang/otp.


On Tue, Mar 6, 2012 at 6:29 AM, Jay Nelson <> wrote:

> [...]
> 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
> _______________________________________________
> erlang-bugs mailing list
> http://erlang.org/mailman/listinfo/erlang-bugs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20120306/021c451b/attachment.html>

More information about the erlang-bugs mailing list