diff options
author | Magnus Lång <[email protected]> | 2016-09-07 16:45:21 +0200 |
---|---|---|
committer | Magnus Lång <[email protected]> | 2016-09-07 16:45:21 +0200 |
commit | 5a9cc02690d033a2f3e695d7ac42c2756dbaaf04 (patch) | |
tree | a90f0eb983d11a4bf99f8e6db5be350afd5e33a5 /lib/hipe/cerl/erl_bif_types.erl | |
parent | 71894a879d6254693791585246ce340dd7414b82 (diff) | |
download | otp-5a9cc02690d033a2f3e695d7ac42c2756dbaaf04.tar.gz otp-5a9cc02690d033a2f3e695d7ac42c2756dbaaf04.tar.bz2 otp-5a9cc02690d033a2f3e695d7ac42c2756dbaaf04.zip |
erl_bif_types: Properly unopaque maps:merge/2 args
erl_bif_types:type/5 was calling erl_types:map_pairwise_merge/3 directly
with its (potentially opaque) arguments, causing Dialyzer crashes.
Bug (ERL-249) reported and minimised test case provided by Felipe
Ripoll.
Diffstat (limited to 'lib/hipe/cerl/erl_bif_types.erl')
-rw-r--r-- | lib/hipe/cerl/erl_bif_types.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/hipe/cerl/erl_bif_types.erl b/lib/hipe/cerl/erl_bif_types.erl index 9453ca6c6f..230fce2e68 100644 --- a/lib/hipe/cerl/erl_bif_types.erl +++ b/lib/hipe/cerl/erl_bif_types.erl @@ -124,7 +124,7 @@ t_map_entries/2, t_map_put/3, t_map_update/3, - map_pairwise_merge/3 + t_map_pairwise_merge/4 ]). -ifdef(DO_ERL_BIF_TYPES_TEST). @@ -1689,10 +1689,10 @@ type(maps, merge, 2, Xs, Opaques) -> BDefK = t_map_def_key(MapB, Opaques), ADefV = t_map_def_val(MapA, Opaques), BDefV = t_map_def_val(MapB, Opaques), - t_map(map_pairwise_merge( + t_map(t_map_pairwise_merge( fun(K, _, _, mandatory, V) -> {K, mandatory, V}; (K, MNess, VA, optional, VB) -> {K, MNess, t_sup(VA,VB)} - end, MapA, MapB), + end, MapA, MapB, Opaques), t_sup(ADefK, BDefK), t_sup(ADefV, BDefV)) end, Opaques); type(maps, put, 3, Xs, Opaques) -> |