diff options
author | Björn-Egil Dahlberg <[email protected]> | 2014-01-17 18:39:47 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2014-01-29 11:08:48 +0100 |
commit | 1ebfc08a004c530faa592a09cf101036329b18fb (patch) | |
tree | 964c9a485e7c137872d8342878b1cf7bf2bb7002 /lib/compiler/test | |
parent | 5b4b6c9b6bd1cf258841004f2e11bb2a82ebfe24 (diff) | |
download | otp-1ebfc08a004c530faa592a09cf101036329b18fb.tar.gz otp-1ebfc08a004c530faa592a09cf101036329b18fb.tar.bz2 otp-1ebfc08a004c530faa592a09cf101036329b18fb.zip |
compiler: Update inliner tests
Diffstat (limited to 'lib/compiler/test')
-rw-r--r-- | lib/compiler/test/inline_SUITE_data/maps_inline_test.erl | 12 |
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. |