[erlang-bugs] Dialyzer crashes on empty map case pattern that can never match

Björn-Egil Dahlberg egil@REDACTED
Mon Apr 28 15:01:12 CEST 2014


Thank you for reporting this.

I'll have a look at it.

// Björn-Egil

On 2014-04-28 00:00, James Fish wrote:
> Dialyzer crashes when analysing a case clause with an empty map 
> pattern when it is known that the pattern can never match.
>
> Minimal example:
>
> function(Tuple) when is_tuple(Tuple) ->
>     case Tuple of #{} -> ok end.
>
> Result:
>
> dialyzer: Analysis failed with error:
> {{case_clause,#{}},
>  [{cerl_prettypr,lay_literal,2,[{file,"cerl_prettypr.erl"},{line,468}]},
> {cerl_prettypr,lay_ann,2,[{file,"cerl_prettypr.erl"},{line,411}]},
> {cerl_prettypr,format,2,[{file,"cerl_prettypr.erl"},{line,271}]},
>   {dialyzer_dataflow,format_patterns,1,
> [{file,"dialyzer_dataflow.erl"},{line,3351}]},
> {dialyzer_dataflow,do_clause,6,[{file,"dialyzer_dataflow.erl"},{line,1245}]},
>   {dialyzer_dataflow,handle_clauses,9,
> [{file,"dialyzer_dataflow.erl"},{line,1177}]},
>   {dialyzer_dataflow,handle_case,3,
> [{file,"dialyzer_dataflow.erl"},{line,936}]},
>   {dialyzer_dataflow,do_clause,6,
> [{file,"dialyzer_dataflow.erl"},{line,1372}]}]}
>
>
>
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@REDACTED
> http://erlang.org/mailman/listinfo/erlang-bugs

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140428/707ce039/attachment.htm>


More information about the erlang-bugs mailing list