diff options
author | Anthony Ramine <[email protected]> | 2014-05-03 20:49:08 +0200 |
---|---|---|
committer | Anthony Ramine <[email protected]> | 2014-05-03 21:06:37 +0200 |
commit | ec15a2aaab58816c728676807c0b6e61d5a5185e (patch) | |
tree | b7e26e2843ac2060696ea12635d393f91ac5dab6 /lib/debugger/test | |
parent | aca0b6182b039333b4c963938878d9eecc85e5a1 (diff) | |
download | otp-ec15a2aaab58816c728676807c0b6e61d5a5185e.tar.gz otp-ec15a2aaab58816c728676807c0b6e61d5a5185e.tar.bz2 otp-ec15a2aaab58816c728676807c0b6e61d5a5185e.zip |
Fix evaluation of map updates in the debugger and erl_eval
Reported-by: José Valim
Diffstat (limited to 'lib/debugger/test')
-rw-r--r-- | lib/debugger/test/int_eval_SUITE.erl | 1 | ||||
-rw-r--r-- | lib/debugger/test/int_eval_SUITE_data/my_int_eval_module.erl | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/debugger/test/int_eval_SUITE.erl b/lib/debugger/test/int_eval_SUITE.erl index ecbd68ab40..9d7ef238e3 100644 --- a/lib/debugger/test/int_eval_SUITE.erl +++ b/lib/debugger/test/int_eval_SUITE.erl @@ -294,6 +294,7 @@ stacktrace(Config) when is_list(Config) -> maps(Config) when is_list(Config) -> Fun = fun () -> ?IM:empty_map_update([camembert]) end, {'EXIT',{{badarg,[camembert]},_}} = spawn_eval(Fun), + [#{hello := 0, price := 0}] = spawn_eval(fun () -> ?IM:update_in_fun() end), ok. diff --git a/lib/debugger/test/int_eval_SUITE_data/my_int_eval_module.erl b/lib/debugger/test/int_eval_SUITE_data/my_int_eval_module.erl index e047a33d8c..7f55360f48 100644 --- a/lib/debugger/test/int_eval_SUITE_data/my_int_eval_module.erl +++ b/lib/debugger/test/int_eval_SUITE_data/my_int_eval_module.erl @@ -29,7 +29,7 @@ -export([more_catch/1,more_nocatch/1,exit_me/0]). -export([f/1, f_try/1, f_catch/1]). -export([otp_5837/1, otp_8310/0]). --export([empty_map_update/1]). +-export([empty_map_update/1, update_in_fun/0]). %% Internal exports. -export([echo/2,my_subtract/2,catch_a_ball/0,throw_a_ball/0]). @@ -244,3 +244,6 @@ otp_8310() -> ok. empty_map_update(Map) -> Map#{}. + +update_in_fun() -> + lists:map(fun (X) -> X#{price := 0} end, [#{hello => 0, price => nil}]). |