aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-02-05 09:50:01 +0100
committerBjörn Gustavsson <[email protected]>2015-02-05 09:50:01 +0100
commit431c196486ebc3d6cc684419d8594eb26deaf846 (patch)
treebb7406385d38d3ce172559c52d532174c5377a65 /lib/compiler/test
parentc1e8eefea2822145100ce05453e8054ea29f4672 (diff)
parentf3a8efa2e4fa6f3f64ee38939103bfd55e78bc51 (diff)
downloadotp-431c196486ebc3d6cc684419d8594eb26deaf846.tar.gz
otp-431c196486ebc3d6cc684419d8594eb26deaf846.tar.bz2
otp-431c196486ebc3d6cc684419d8594eb26deaf846.zip
Merge branch 'maint'
* maint: Update primary bootstrap Correct unsafe optimization of '==' and '/=' Conflicts: bootstrap/lib/compiler/ebin/sys_core_fold.beam
Diffstat (limited to 'lib/compiler/test')
-rw-r--r--lib/compiler/test/core_fold_SUITE.erl10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/compiler/test/core_fold_SUITE.erl b/lib/compiler/test/core_fold_SUITE.erl
index ce1aea5de0..1358e002e2 100644
--- a/lib/compiler/test/core_fold_SUITE.erl
+++ b/lib/compiler/test/core_fold_SUITE.erl
@@ -210,6 +210,16 @@ eq(Config) when is_list(Config) ->
?line ?CMP_DIFF(a, [a]),
?line ?CMP_DIFF(a, {1,2,3}),
+ ?CMP_SAME(#{a=>1.0,b=>2}, #{b=>2.0,a=>1}),
+ ?CMP_SAME(#{a=>[1.0],b=>[2]}, #{b=>[2.0],a=>[1]}),
+
+ %% The rule for comparing keys are different in 17.x and 18.x.
+ %% Just test that the results are consistent.
+ Bool = id(#{1=>a}) == id(#{1.0=>a}), %Unoptimizable.
+ Bool = id(#{1=>a}) == #{1.0=>a}, %Optimizable.
+ Bool = #{1=>a} == #{1.0=>a}, %Optimizable.
+ io:format("Bool = ~p\n", [Bool]),
+
ok.
%% OTP-7117.