aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/core_SUITE_data/get_map_element.core
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2019-05-29 13:24:44 +0200
committerErlang/OTP <[email protected]>2019-05-29 13:24:44 +0200
commitdf4553e703673565db79e7a8340db86615a369ea (patch)
tree2a49dcb3be6a1ca4b7b6dc0b57d14b9cd8d59582 /lib/compiler/test/core_SUITE_data/get_map_element.core
parentebab8243464392428b4e2e9f321c8716ec199355 (diff)
parent73c5ceba1185b0be7db9acac8593e5b913dba845 (diff)
downloadotp-df4553e703673565db79e7a8340db86615a369ea.tar.gz
otp-df4553e703673565db79e7a8340db86615a369ea.tar.bz2
otp-df4553e703673565db79e7a8340db86615a369ea.zip
Merge branch 'bjorn/compiler/fix-unloadable-code-patch/ERL-955/OTP-15846' into maint-22
* bjorn/compiler/fix-unloadable-code-patch/ERL-955/OTP-15846: Fix loading of Core Erlang code for extracting a map element
Diffstat (limited to 'lib/compiler/test/core_SUITE_data/get_map_element.core')
-rw-r--r--lib/compiler/test/core_SUITE_data/get_map_element.core18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/compiler/test/core_SUITE_data/get_map_element.core b/lib/compiler/test/core_SUITE_data/get_map_element.core
new file mode 100644
index 0000000000..092b5e71eb
--- /dev/null
+++ b/lib/compiler/test/core_SUITE_data/get_map_element.core
@@ -0,0 +1,18 @@
+module 'get_map_element' ['get_map_element'/0]
+attributes []
+
+'get_map_element'/0 =
+ fun () ->
+ apply 'match_map'/1(~{'foo'=>'bar'}~)
+
+'match_map'/1 =
+ fun (_0) ->
+ case _0 of
+ <~{'foo':='bar'}~> when 'true' ->
+ 'ok'
+ %% It will be undefined behaviour at runtime if no
+ %% clause of the case can be selected. That can't
+ %% happen for this module, because match_map/1 is
+ %% always called with a matching map argument.
+ end
+end