[erlang-patches] Patch for dialyzer complaining on certain binary comprehensions

Stavros Aronis <>
Sat Jul 16 14:13:17 CEST 2011

Hi Ivan,

I have added your patch in a series of patches for Dialyzer I am about to
send. I have also amended it to include the testcase you provide.

Just for the record, if a test is not supposed to return any warnings,
including it in Dialyzer's testsuites is as simple as putting the source
file in one of the *_SUITE_data/src directories (if warnings are expected,
they should be listed in a similar file in *_SUITE_data/results).

Thank you for your contribution,


On Thu, Jul 14, 2011 at 12:03 PM, Ivan Dubrov <> wrote:

> Hi,
> Please consider the patch to the dialyzer to suppress warnings emitted on
> certain binary comprehensions, like << <<>> || {A, B} <- [{a, b}] >>, caused
> by compiler-emitted default clause. Dialyzer already have a code that
> suppresses the warning for regular list comprehensions, but it does not work
> for binary comprehensions.
> Unfortunately, I did not understood how to implement a test case for
> dialyzer, so I have not created one. Attached is a test file, run "dialyzer
> test.erl" to get the warning:
>   test.erl:7: The pattern <[_ | _], _> can never match the type
> <[],<<_:_*1>>>
> Fetch fix from:
> git fetch git://github.com/idubrov/otp.**git<http://github.com/idubrov/otp.git>dialyzer_bincomp_bug
> --
> WBR,
> Ivan S. Dubrov
> _______________________________________________
> erlang-patches mailing list
> http://erlang.org/mailman/listinfo/erlang-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20110716/aa265e2f/attachment.html>

More information about the erlang-patches mailing list