aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2019-02-11 08:59:05 +0100
committerHans Bolinder <[email protected]>2019-02-11 08:59:05 +0100
commit5a5e34ab31417f0cea2859ea8e22c04f59e82193 (patch)
treebd494099f42ac729836d6798250e13ee85c8f2f7 /lib/dialyzer/test
parenteac67ca98374701eb27be53836a216e8600be4aa (diff)
parentfbb6ee2fa4fca7b908fcd502c769a66420765b36 (diff)
downloadotp-5a5e34ab31417f0cea2859ea8e22c04f59e82193.tar.gz
otp-5a5e34ab31417f0cea2859ea8e22c04f59e82193.tar.bz2
otp-5a5e34ab31417f0cea2859ea8e22c04f59e82193.zip
Merge branch 'maint'
* maint: dialyzer: Fix a bug affecting keyfind/keysearch/keymember
Diffstat (limited to 'lib/dialyzer/test')
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/lists_key_bug.erl19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/dialyzer/test/small_SUITE_data/src/lists_key_bug.erl b/lib/dialyzer/test/small_SUITE_data/src/lists_key_bug.erl
new file mode 100644
index 0000000000..d7cbc27a4d
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/lists_key_bug.erl
@@ -0,0 +1,19 @@
+-module(lists_key_bug).
+
+%% OTP-15570
+
+-export([t/1]).
+
+t(V) ->
+ K = key(V),
+ case lists:keyfind(K, 1, [{<<"foo">>, bar}]) of
+ false ->
+ a;
+ {_, _} ->
+ b
+ end.
+
+key(1) ->
+ 3;
+key(2) ->
+ <<"foo">>.