<div dir="ltr"><div>Sorry for the late reply, I finally managed to get a minimal test case that reproduces the bug in 17.5:</div><div><br></div><div>-module(sum).</div><div>-export([</div><div><span class="Apple-tab-span" style="white-space:pre">    </span>test/1</div><div>]).</div><div><br></div><div>-spec test(#{atom() => term()}) -> integer().</div><div>test(Data) -></div><div><span class="Apple-tab-span" style="white-space:pre">   </span>maps:fold(fun</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>(_Key, Value, Acc) when is_integer(Value) -></div><div><span class="Apple-tab-span" style="white-space:pre">                      </span>Acc + Value;</div><div><span class="Apple-tab-span" style="white-space:pre">         </span>(_Key, _Value, Acc) -></div><div><span class="Apple-tab-span" style="white-space:pre">                    </span>Acc</div><div><span class="Apple-tab-span" style="white-space:pre">  </span>end, 0, Data).</div><div><br></div><div><br></div><div>I don't know if this is the correct fix, but this makes dialyzer work again:</div><div><br></div><div><div>diff --git a/lib/hipe/cerl/erl_types.erl b/lib/hipe/cerl/erl_types.erl</div><div>index 4215448..bb4c1c1 100644</div><div>--- a/lib/hipe/cerl/erl_types.erl</div><div>+++ b/lib/hipe/cerl/erl_types.erl</div><div>@@ -4594,6 +4594,8 @@ t_form_to_string({type, _L, list, [Type]}) -></div><div>   "[" ++ t_form_to_string(Type) ++ "]";</div><div> t_form_to_string({type, _L, map, Args}) when not is_list(Args) -></div><div>   "#{}";</div><div>+t_form_to_string({type, _L, map_field_assoc, Key, Value}) -></div><div>+  "#{" ++ t_form_to_string(Key) ++ "=>" ++ t_form_to_string(Value) ++ "}";</div><div> t_form_to_string({type, _L, mfa, []}) -> "mfa()";</div><div> t_form_to_string({type, _L, module, []}) -> "module()";</div><div> t_form_to_string({type, _L, node, []}) -> "node()";</div></div><div><br></div><div>Thanks,</div><div>Ali</div></div><br><div class="gmail_quote">On Tue, Apr 7, 2015 at 2:31 PM Björn-Egil Dahlberg <<a href="mailto:wallentin.dahlberg@gmail.com">wallentin.dahlberg@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Again - could you provide me with a sample code .. or at least some sort of a clue to what you are dialyzing?</div><div class="gmail_extra"><br><div class="gmail_quote"></div></div><div class="gmail_extra"><div class="gmail_quote">2015-04-07 14:05 GMT+02:00 Ali Sabil <span dir="ltr"><<a href="mailto:ali.sabil@gmail.com" target="_blank">ali.sabil@gmail.com</a>></span>:<br></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi again,<br><br>Running dialyzer shipped with 17.5 on the same code base leads now to the following error (17.4 works without any errors):<div><br></div><div><div>===> Error in dialyzing apps: Analysis failed with error:</div><div>{function_clause,[{erl_types,t_form_to_string,</div><div>                             [{type,36,map_field_assoc,</div><div>                                    {type,36,atom,[]},</div><div>                                    {type,36,term,[]}}],</div><div>                             [{file,"erl_types.erl"},{line,4546}]},</div><div>                  {erl_types,t_form_to_string_list,2,</div><div>                             [{file,"erl_types.erl"},{line,4637}]},</div><div>                  {erl_types,t_form_to_string,1,</div><div>                             [{file,"erl_types.erl"},{line,4634}]},</div><div>                  {erl_types,t_form_to_string_list,2,</div><div>                             [{file,"erl_types.erl"},{line,4637}]},</div><div>                  {erl_types,t_form_to_string,1,</div><div>                             [{file,"erl_types.erl"},{line,4634}]},</div><div>                  {dialyzer_contracts,contract_to_string_1,1,</div><div>                                      [{file,"dialyzer_contracts.erl"},</div><div>                                       {line,107}]},</div><div>                  {dialyzer_contracts,extra_contract_warning,6,</div><div>                                      [{file,"dialyzer_contracts.erl"},</div><div>                                       {line,712}]},</div><div>                  {dialyzer_contracts,picky_contract_check,7,</div><div>                                      [{file,"dialyzer_contracts.erl"},</div><div>                                       {line,686}]}]}</div><span><div>Last messages in the log cache:</div></span><div>  Reading files and computing callgraph... done in 1.21 secs</div><div>  Removing edges... done in 0.04 secs</div></div><div><br></div></div><div><div><br><div class="gmail_quote">On Wed, Mar 18, 2015 at 12:12 PM Björn-Egil Dahlberg <<a href="mailto:egil@erlang.org" target="_blank">egil@erlang.org</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 2015-03-18 12:01, Ali Sabil wrote:<br>
> I tried to create a minimal testcase but I unfortunately haven't been<br>
> able to. I was running dialyzer on a quite large code base and now<br>
> even the unpatched dialyzer works without any issue after I fixed all<br>
> the issues reported by dialyzer.<br>
<br>
Ah, well .. I suspect it was the missing clause in find_terminals and I<br>
had it on a TODO somewhere. Should be included to 17.5.<br>
<br>
// Björn-Egil<br>
</blockquote></div>
</div></div><br></blockquote></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div></div></blockquote></div>