aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/match_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-02-03 08:13:35 +0100
committerBjörn Gustavsson <[email protected]>2015-02-03 08:13:35 +0100
commitc8bbf52191e3c87eedde061051eebcd02dbb7fd5 (patch)
tree79d5b18ff06548c6b42f969dd3c93a2998c7ad52 /lib/compiler/test/match_SUITE.erl
parent92a0424a0ece205072516e97086b5986986dca37 (diff)
parent0fee86f864a4ba2a7a363927a50c81c43994ca9a (diff)
downloadotp-c8bbf52191e3c87eedde061051eebcd02dbb7fd5.tar.gz
otp-c8bbf52191e3c87eedde061051eebcd02dbb7fd5.tar.bz2
otp-c8bbf52191e3c87eedde061051eebcd02dbb7fd5.zip
Merge branch 'maint'
* maint: Update primary bootstrap Be more careful about map patterns when evalutating element/2 Do not convert map patterns to map expressions Conflicts: bootstrap/lib/compiler/ebin/sys_core_fold.beam lib/compiler/test/match_SUITE.erl
Diffstat (limited to 'lib/compiler/test/match_SUITE.erl')
-rw-r--r--lib/compiler/test/match_SUITE.erl8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/compiler/test/match_SUITE.erl b/lib/compiler/test/match_SUITE.erl
index 74efed7588..7522ee985f 100644
--- a/lib/compiler/test/match_SUITE.erl
+++ b/lib/compiler/test/match_SUITE.erl
@@ -407,12 +407,19 @@ underscore(Config) when is_list(Config) ->
match_map(Config) when is_list(Config) ->
Map = #{key=>{x,y},ignore=>anything},
#s{map=Map,t={x,y}} = do_match_map(#s{map=Map}),
+ {a,#{k:={a,b,c}}} = do_match_map_2(#{k=>{a,b,c}}),
ok.
do_match_map(#s{map=#{key:=Val}}=S) ->
%% Would crash with a 'badarg' exception.
S#s{t=Val}.
+do_match_map_2(Map) ->
+ case {a,Map} of
+ {a,#{k:=_}}=Tuple ->
+ Tuple
+ end.
+
map_vars_used(Config) when is_list(Config) ->
{some,value} = do_map_vars_used(a, b, #{{a,b}=>42,v=>{some,value}}),
ok.
@@ -425,7 +432,6 @@ do_map_vars_used(X, Y, Map) ->
Val
end.
-
coverage(Config) when is_list(Config) ->
%% Cover beam_dead.
ok = coverage_1(x, a),