aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/inline_SUITE_data
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2014-01-17 18:39:47 +0100
committerBjörn-Egil Dahlberg <[email protected]>2014-01-29 11:08:48 +0100
commit1ebfc08a004c530faa592a09cf101036329b18fb (patch)
tree964c9a485e7c137872d8342878b1cf7bf2bb7002 /lib/compiler/test/inline_SUITE_data
parent5b4b6c9b6bd1cf258841004f2e11bb2a82ebfe24 (diff)
downloadotp-1ebfc08a004c530faa592a09cf101036329b18fb.tar.gz
otp-1ebfc08a004c530faa592a09cf101036329b18fb.tar.bz2
otp-1ebfc08a004c530faa592a09cf101036329b18fb.zip
compiler: Update inliner tests
Diffstat (limited to 'lib/compiler/test/inline_SUITE_data')
-rw-r--r--lib/compiler/test/inline_SUITE_data/maps_inline_test.erl12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/compiler/test/inline_SUITE_data/maps_inline_test.erl b/lib/compiler/test/inline_SUITE_data/maps_inline_test.erl
index 87a8f86b47..d9762e2647 100644
--- a/lib/compiler/test/inline_SUITE_data/maps_inline_test.erl
+++ b/lib/compiler/test/inline_SUITE_data/maps_inline_test.erl
@@ -41,7 +41,17 @@
sval(#{id => 3}) +
sval(#{id => 4}) +
sval(#{id => 5}) +
- sval(#{id => 6}).
+ sval(#{id => 6}),
+
+ M = #{v => 1, m => #{v => 21, m => #{v => 7, m => 13}}},
+
+ 42 = decompose(M).
+
+% switch key orders
+decompose(#{ m := M, v := V}) when is_map(M) ->
+ V + decompose(M);
+decompose(#{ v := V, m := M}) -> V + M.
+
mval(#{val := V}) -> V.