Hi Jay,<div><br></div><div>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:</div>
<div><br></div><div>-spec init(Args::{}) -> {ok,{{supervisor:restart_strategy(),MaxR::non_neg_integer(),MaxT::non_neg_integer()},[supervisor:child_spec()]}}.</div><div><br></div><div>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.</div>
<div><br></div><div>Regards,</div><div>Stavros<br><br><div class="gmail_quote">On Tue, Mar 6, 2012 at 6:29 AM, Jay Nelson <span dir="ltr"><<a href="mailto:jay@duomark.com">jay@duomark.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
[...]<br>
<br>
This problem can be recreated with a simple supervisor:init spec, pasted<br>
into any handy supervisor:init you have laying around:<br>
<br>
-spec init(Args::{}) -> {ok, {tuple(), list()}}.<br>
<br>
When I try it with R14B03, there are no errors.<br>
On R15B I get the above error.<br>
<br>
jay<br>
<br>
_______________________________________________<br>
erlang-bugs mailing list<br>
<a href="mailto:erlang-bugs@erlang.org">erlang-bugs@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-bugs" target="_blank">http://erlang.org/mailman/listinfo/erlang-bugs</a><br>
</blockquote></div><br></div>