aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test
diff options
context:
space:
mode:
authorIvan Dubrov <[email protected]>2011-07-13 15:25:01 +0700
committerHenrik Nord <[email protected]>2011-08-17 09:16:37 +0200
commitb4f5b85d0a7f288db70093d806920d004d8b0e83 (patch)
tree4c5f76e1eee32f588b7c546ae95e7f4a1e8e4313 /lib/dialyzer/test
parent964f6fce397193fb1a6235d7aaed474b6868d73e (diff)
downloadotp-b4f5b85d0a7f288db70093d806920d004d8b0e83.tar.gz
otp-b4f5b85d0a7f288db70093d806920d004d8b0e83.tar.bz2
otp-b4f5b85d0a7f288db70093d806920d004d8b0e83.zip
Fix dialyzer warning on default clause for binary comprehension
Fixed dialyzer warning occuring on binary comprehension of form "<< <<>> || {A, B} <- [{a, b}] >>" caused by default clause inserted by compiler. Since this clause is different from the case of list comprehension, dialyzer fails to suppress that warning.
Diffstat (limited to 'lib/dialyzer/test')
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/binary_lc_bug.erl8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/dialyzer/test/small_SUITE_data/src/binary_lc_bug.erl b/lib/dialyzer/test/small_SUITE_data/src/binary_lc_bug.erl
new file mode 100644
index 0000000000..c1e82bfa59
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/binary_lc_bug.erl
@@ -0,0 +1,8 @@
+-module(test).
+
+-export([bin_compr/0]).
+
+bin_compr() ->
+% [ 0 || {N, V} <- [{a, b}] ]. % Works ok
+ << <<>> || {A, B} <- [{a, b}] >>. % Complains
+% << <<>> || X <- [{a, b}] >>. % Works ok