aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/test
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-11-23 16:28:17 +0100
committerSverker Eriksson <[email protected]>2016-11-23 16:28:17 +0100
commit769874dc399249272a87bcb7ef46905698bb24d2 (patch)
tree01a4037d7d6208b09bbfa1e04372bd98cad45d44 /lib/hipe/test
parentf9382be98398bdb5fe208d99823d7e0d4431f1f2 (diff)
parent2ee19c8a5b44a5b4eeb21f1e6ba6ae4236563c6f (diff)
downloadotp-769874dc399249272a87bcb7ef46905698bb24d2.tar.gz
otp-769874dc399249272a87bcb7ef46905698bb24d2.tar.bz2
otp-769874dc399249272a87bcb7ef46905698bb24d2.zip
Merge branch 'maint'
Diffstat (limited to 'lib/hipe/test')
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_redundant_branch_is_key.erl14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/hipe/test/maps_SUITE_data/maps_redundant_branch_is_key.erl b/lib/hipe/test/maps_SUITE_data/maps_redundant_branch_is_key.erl
new file mode 100644
index 0000000000..17c3acd6af
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_redundant_branch_is_key.erl
@@ -0,0 +1,14 @@
+-module(maps_redundant_branch_is_key).
+-export([test/0]).
+
+test() ->
+ ok = thingy(#{a => 1}),
+ ok = thingy(#{a => 2}),
+ ok.
+
+thingy(Map) ->
+ try
+ #{a := _} = Map,
+ ok
+ catch _ -> error
+ end.