aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2016-09-12 08:48:10 +0200
committerHans Bolinder <[email protected]>2016-09-12 08:48:10 +0200
commit86d1fb0865193cce4e308baa6472885a81033f10 (patch)
treee062f4f7a55175d223657181c73d2a3a1d3837d1 /lib/dialyzer
parentd657917bec8805efeec3cfe6a45edf462b2e73e5 (diff)
parent5a9cc02690d033a2f3e695d7ac42c2756dbaaf04 (diff)
downloadotp-86d1fb0865193cce4e308baa6472885a81033f10.tar.gz
otp-86d1fb0865193cce4e308baa6472885a81033f10.tar.bz2
otp-86d1fb0865193cce4e308baa6472885a81033f10.zip
Merge branch 'margnus1/dialyzer/fix_maps_opaque/ERL-249/PR-1161/OTP-13878' into maint
* margnus1/dialyzer/fix_maps_opaque/ERL-249/PR-1161/OTP-13878: erl_bif_types: Properly unopaque maps:merge/2 args
Diffstat (limited to 'lib/dialyzer')
-rw-r--r--lib/dialyzer/test/map_SUITE_data/src/opaque_bif.erl13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/dialyzer/test/map_SUITE_data/src/opaque_bif.erl b/lib/dialyzer/test/map_SUITE_data/src/opaque_bif.erl
new file mode 100644
index 0000000000..40214a1887
--- /dev/null
+++ b/lib/dialyzer/test/map_SUITE_data/src/opaque_bif.erl
@@ -0,0 +1,13 @@
+-module(opaque_bif).
+-export([o1/1]).
+-export_type([opaque_any_map/0]).
+-opaque opaque_any_map() :: map().
+
+%% ERL-249: A bug with opaque arguments to maps:merge/2
+%% Reported by Felipe Ripoll on 6/9/2016
+-spec o1(opaque_any_map()) -> opaque_any_map().
+o1(Map) ->
+ maps:merge(o1_c(), Map).
+
+-spec o1_c() -> opaque_any_map().
+o1_c() -> #{}.