diff options
author | Erlang/OTP <[email protected]> | 2018-07-18 14:19:23 +0200 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2018-07-18 14:19:23 +0200 |
commit | 5779b53086acccbf9b1dd6001bba018d47dd743c (patch) | |
tree | a54af4d7fb25d43e0115399687c6a0ac9dbe8d56 /erts/emulator/test/map_SUITE.erl | |
parent | 9b351732d90d5d7a159509dec6dc36aefb75699f (diff) | |
parent | 32d674c58ba0cfddb2d5e2e83a8bf3b9a70cce4d (diff) | |
download | otp-5779b53086acccbf9b1dd6001bba018d47dd743c.tar.gz otp-5779b53086acccbf9b1dd6001bba018d47dd743c.tar.bz2 otp-5779b53086acccbf9b1dd6001bba018d47dd743c.zip |
Merge branch 'john/erts/fix-literal-map-elements/OTP-15184' into maint-21
* john/erts/fix-literal-map-elements/OTP-15184:
Fix a rare crash when matching on literal maps
Diffstat (limited to 'erts/emulator/test/map_SUITE.erl')
-rw-r--r-- | erts/emulator/test/map_SUITE.erl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/erts/emulator/test/map_SUITE.erl b/erts/emulator/test/map_SUITE.erl index f93c637650..d0a6763fe5 100644 --- a/erts/emulator/test/map_SUITE.erl +++ b/erts/emulator/test/map_SUITE.erl @@ -3080,8 +3080,19 @@ y_regs(Config) when is_list(Config) -> true = is_map(Map2) andalso is_map(Map4), + gurka = y_regs_literal(0), + gaffel = y_regs_literal(1), + ok. +y_regs_literal(Key) when is_integer(Key) -> + %% Forces the key to be placed in a Y register. + lists:seq(1, 2), + case is_map_key(Key, #{ 0 => 0 }) of + true -> gurka; + false -> gaffel + end. + y_regs_update(Map0, Val0) -> Val1 = {t,Val0}, K1 = id({key,1}), |