diff options
-rw-r--r-- | erts/doc/src/notes.xml | 29 | ||||
-rw-r--r-- | erts/emulator/beam/erl_node_tables.c | 2 | ||||
-rw-r--r-- | erts/vsn.mk | 2 | ||||
-rw-r--r-- | lib/common_test/doc/src/ct_suite.xml | 8 | ||||
-rw-r--r-- | lib/common_test/doc/src/run_test_chapter.xml | 2 | ||||
-rw-r--r-- | lib/common_test/doc/src/write_test_chapter.xml | 6 | ||||
-rw-r--r-- | lib/common_test/src/ct_suite.erl | 4 | ||||
-rw-r--r-- | lib/compiler/doc/src/notes.xml | 15 | ||||
-rw-r--r-- | lib/compiler/src/beam_ssa_check.erl | 5 | ||||
-rw-r--r-- | lib/compiler/src/beam_ssa_private_append.erl | 21 | ||||
-rw-r--r-- | lib/compiler/test/beam_ssa_check_SUITE_data/private_append.erl | 27 | ||||
-rw-r--r-- | lib/compiler/test/beam_ssa_check_SUITE_data/sanity_checks.erl | 16 | ||||
-rw-r--r-- | lib/compiler/vsn.mk | 2 | ||||
-rw-r--r-- | lib/os_mon/doc/src/notes.xml | 17 | ||||
-rw-r--r-- | lib/os_mon/vsn.mk | 2 | ||||
-rw-r--r-- | lib/wx/c_src/Makefile.in | 6 | ||||
-rw-r--r-- | otp_versions.table | 1 | ||||
-rw-r--r-- | system/doc/general_info/upcoming_incompatibilities.xml | 60 |
18 files changed, 208 insertions, 17 deletions
diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index d31a438ede..1f372823e8 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,35 @@ </header> <p>This document describes the changes made to the ERTS application.</p> +<section><title>Erts 13.2.2</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + If a runtime system which was starting the distribution + already had existing pids, ports, or references referring + to a node with the same nodename/creation pair that the + runtime system was about to use, these already existing + pids, ports, or references would not work as expected in + various situations after the node had gone alive. This + could only occur if the runtime system was communicated + such pids, ports, or references prior to the distribution + was started. That is, it was extremely unlikely to happen + unless the distribution was started dynamically and was + even then very unlikely to happen. The runtime system now + checks for already existing pids, ports, and references + with the same nodename/creation pair that it is about to + use. If such are found another creation will be chosen in + order to avoid these issues.</p> + <p> + Own Id: OTP-18570 Aux Id: PR-7190 </p> + </item> + </list> + </section> + +</section> + <section><title>Erts 13.2.1</title> <section><title>Fixed Bugs and Malfunctions</title> diff --git a/erts/emulator/beam/erl_node_tables.c b/erts/emulator/beam/erl_node_tables.c index c2d9b0967d..dac24d0310 100644 --- a/erts/emulator/beam/erl_node_tables.c +++ b/erts/emulator/beam/erl_node_tables.c @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 2001-2022. All Rights Reserved. + * Copyright Ericsson AB 2001-2023. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/erts/vsn.mk b/erts/vsn.mk index 44cd2f0475..67df301d2e 100644 --- a/erts/vsn.mk +++ b/erts/vsn.mk @@ -18,7 +18,7 @@ # %CopyrightEnd% # -VSN = 13.2.1 +VSN = 13.2.2 # Port number 4365 in 4.2 # Port number 4366 in 4.3 diff --git a/lib/common_test/doc/src/ct_suite.xml b/lib/common_test/doc/src/ct_suite.xml index 8740a3ff79..cc926fbcbb 100644 --- a/lib/common_test/doc/src/ct_suite.xml +++ b/lib/common_test/doc/src/ct_suite.xml @@ -85,7 +85,9 @@ <fsummary>Returns the list of all test case groups and test cases in the module.</fsummary> <type> - <v><seetype marker="#ct_test_def">ct_test_def()</seetype> = TestCase | {group, GroupName} | {group, GroupName, Properties} | {group, GroupName, Properties, SubGroups}</v> + <v><seetype marker="#ct_test_def">ct_test_def()</seetype> = TestCase | + {group, GroupName} | {group, GroupName, Properties} | {group, GroupName, + Properties, SubGroups} | {testcase, TestCase, TestCaseRepeatType}</v> <v>TestCase = <seetype marker="#ct_testname">ct_testname()</seetype></v> <v>GroupName = <seetype marker="#ct_groupname">ct_groupname()</seetype></v> <v>Properties = [parallel | sequence | Shuffle | {RepeatType, N}] | default</v> @@ -93,6 +95,7 @@ <v>Shuffle = shuffle | {shuffle, Seed}</v> <v>Seed = {integer(), integer(), integer()}</v> <v>RepeatType = repeat | repeat_until_all_ok | repeat_until_all_fail | repeat_until_any_ok | repeat_until_any_fail</v> + <v>TestCaseRepeatType = [{repeat, N} | {repeat_until_ok, N} | {repeat_until_fail, N}]</v> <v>N = integer() | forever</v> <v>Reason = term()</v> </type> @@ -135,11 +138,12 @@ <v><seetype marker="#ct_group_def">ct_group_def()</seetype> = {GroupName, Properties, GroupsAndTestCases}</v> <v>GroupName = <seetype marker="#ct_groupname">ct_groupname()</seetype></v> <v>Properties = [parallel | sequence | Shuffle | {RepeatType, N}]</v> - <v>GroupsAndTestCases = [Group | {group, GroupName} | TestCase]</v> + <v>GroupsAndTestCases = [Group | {group, GroupName} | TestCase | {testcase, TestCase, TestCaseRepeatType}]</v> <v>TestCase = <seetype marker="#ct_testname">ct_testname()</seetype></v> <v>Shuffle = shuffle | {shuffle, Seed}</v> <v>Seed = {integer(), integer(), integer()}</v> <v>RepeatType = repeat | repeat_until_all_ok | repeat_until_all_fail | repeat_until_any_ok | repeat_until_any_fail</v> + <v>TestCaseRepeatType = [{repeat, N} | {repeat_until_ok, N} | {repeat_until_fail, N}]</v> <v>N = integer() | forever</v> </type> diff --git a/lib/common_test/doc/src/run_test_chapter.xml b/lib/common_test/doc/src/run_test_chapter.xml index f9416e1bee..ea33b9d8f9 100644 --- a/lib/common_test/doc/src/run_test_chapter.xml +++ b/lib/common_test/doc/src/run_test_chapter.xml @@ -763,7 +763,7 @@ finally function <c>end_per_group</c>. Also, if particular test cases in a group are specified, <c>init_per_group</c> and <c>end_per_group</c>, for the group in question, are - called. If a group defined (in <c>Suite:group/0</c>) as + called. If a group defined (in <c>Suite:groups/0</c>) as a subgroup of another group, is specified (or if particular test cases of a subgroup are), <c>Common Test</c> calls the configuration functions for the top-level groups and for the subgroup diff --git a/lib/common_test/doc/src/write_test_chapter.xml b/lib/common_test/doc/src/write_test_chapter.xml index 8f7c7e8177..99571bbdae 100644 --- a/lib/common_test/doc/src/write_test_chapter.xml +++ b/lib/common_test/doc/src/write_test_chapter.xml @@ -515,14 +515,14 @@ <c>{group,GroupName,Properties,SubGroups}</c> Where, <c>SubGroups</c> is a list of tuples, <c>{GroupName,Properties}</c> or <c>{GroupName,Properties,SubGroups}</c> representing the subgroups. - Any subgroups defined in <c>group/0</c> for a group, that are not specified + Any subgroups defined in <c>groups/0</c> for a group, that are not specified in the <c>SubGroups</c> list, executes with their predefined properties.</p> <p><em>Example:</em></p> <pre> - groups() -> {tests1, [], [{tests2, [], [t2a,t2b]}, - {tests3, [], [t31,t3b]}]}.</pre> + groups() -> [{tests1, [], [{tests2, [], [t2a,t2b]}, + {tests3, [], [t31,t3b]}]}].</pre> <p>To execute group <c>tests1</c> twice with different properties for <c>tests2</c> each time:</p> <pre> diff --git a/lib/common_test/src/ct_suite.erl b/lib/common_test/src/ct_suite.erl index a2d23e15ef..860efe3ae2 100644 --- a/lib/common_test/src/ct_suite.erl +++ b/lib/common_test/src/ct_suite.erl @@ -47,9 +47,9 @@ {group, ct_groupname(), ct_group_props_ref()} | {group, ct_groupname(), ct_group_props_ref(), ct_subgroups_def()}. -type ct_testcase_ref() :: {testcase, ct_testname(), ct_testcase_repeat_prop()}. --type ct_testcase_repeat_prop() :: {repeat, ct_test_repeat()} | +-type ct_testcase_repeat_prop() :: [{repeat, ct_test_repeat()} | {repeat_until_ok, ct_test_repeat()} | - {repeat_until_fail, ct_test_repeat()}. + {repeat_until_fail, ct_test_repeat()}]. -type ct_info() :: {timetrap, ct_info_timetrap()} | {require, ct_info_required()} | {require, Name :: atom(), ct_info_required()} | diff --git a/lib/compiler/doc/src/notes.xml b/lib/compiler/doc/src/notes.xml index 75396f4c0f..f92505409c 100644 --- a/lib/compiler/doc/src/notes.xml +++ b/lib/compiler/doc/src/notes.xml @@ -32,6 +32,21 @@ <p>This document describes the changes made to the Compiler application.</p> +<section><title>Compiler 8.2.6</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p>Fixed type handling bugs that could cause an internal + error in the compiler for correct code.</p> + <p> + Own Id: OTP-18565 Aux Id: GH-7147 </p> + </item> + </list> + </section> + +</section> + <section><title>Compiler 8.2.5</title> <section><title>Fixed Bugs and Malfunctions</title> diff --git a/lib/compiler/src/beam_ssa_check.erl b/lib/compiler/src/beam_ssa_check.erl index 0d3faa0ee2..f344286943 100644 --- a/lib/compiler/src/beam_ssa_check.erl +++ b/lib/compiler/src/beam_ssa_check.erl @@ -285,8 +285,9 @@ env_post1(_Pattern, _Actual, _Env) -> ?DP("Failed to match ~p <-> ~p~n", [_Pattern, _Actual]), error({internal_pattern_match_error,env_post1}). -post_bitstring(Bytes, Actual, _Env) -> - Actual = build_bitstring(Bytes, <<>>). +post_bitstring(Bytes, Actual, Env) -> + Actual = build_bitstring(Bytes, <<>>), + Env. %% Convert the parsed literal binary to an actual bitstring. build_bitstring([{integer,_,V}|Bytes], Acc) -> diff --git a/lib/compiler/src/beam_ssa_private_append.erl b/lib/compiler/src/beam_ssa_private_append.erl index bf51e8b81a..c295492762 100644 --- a/lib/compiler/src/beam_ssa_private_append.erl +++ b/lib/compiler/src/beam_ssa_private_append.erl @@ -86,6 +86,17 @@ find_appends_blk([], _, Found) -> Found. find_appends_is([#b_set{dst=Dst, op=bs_create_bin, + args=[#b_literal{val=append}, + _, + Lit=#b_literal{val= <<>>}|_]}|Is], + Fun, Found0) -> + %% Special case for when the first fragment is a literal <<>> as + %% it won't be annotated as unique nor will it die with the + %% instruction. + AlreadyFound = maps:get(Fun, Found0, []), + Found = Found0#{Fun => [{append,Dst,Lit}|AlreadyFound]}, + find_appends_is(Is, Fun, Found); +find_appends_is([#b_set{dst=Dst, op=bs_create_bin, args=[#b_literal{val=append},SegmentInfo,Var|_], anno=#{first_fragment_dies:=Dies}=Anno}|Is], Fun, Found0) -> @@ -468,6 +479,16 @@ patch_appends_is([I0=#b_set{dst=Dst}|Rest], PD0, Cnt0, Acc, BlockAdditions0) Ps = keysort(1, map(ExtractOpargs, Patches)), {Is, Cnt} = patch_opargs(I0, Ps, Cnt0), patch_appends_is(Rest, PD, Cnt, Is++Acc, BlockAdditions0); + [{append,Dst,#b_literal{val= <<>>}=Lit}] -> + %% Special case for when the first fragment is a literal + %% <<>> and it has to be replaced with a bs_init_writable. + #b_set{op=bs_create_bin,dst=Dst,args=Args0}=I0, + [#b_literal{val=append},SegInfo,Lit|OtherArgs] = Args0, + {V,Cnt} = new_var(Cnt0), + Init = #b_set{op=bs_init_writable,dst=V,args=[#b_literal{val=256}]}, + I = I0#b_set{args=[#b_literal{val=private_append}, + SegInfo,V|OtherArgs]}, + patch_appends_is(Rest, PD, Cnt, [I,Init|Acc], BlockAdditions0); [{append,Dst,_}] -> #b_set{op=bs_create_bin,dst=Dst,args=Args0}=I0, [#b_literal{val=append}|OtherArgs] = Args0, diff --git a/lib/compiler/test/beam_ssa_check_SUITE_data/private_append.erl b/lib/compiler/test/beam_ssa_check_SUITE_data/private_append.erl index 4d4b0f1bbd..c1edc54460 100644 --- a/lib/compiler/test/beam_ssa_check_SUITE_data/private_append.erl +++ b/lib/compiler/test/beam_ssa_check_SUITE_data/private_append.erl @@ -22,6 +22,8 @@ %% -module(private_append). +-feature(maybe_expr, enable). + -export([transformable0/1, transformable1/1, transformable1b/1, @@ -76,7 +78,9 @@ not_transformable14/0, not_transformable15/2, - id/1]). + id/1, + + bs_create_bin_on_literal/0]). %% Trivial smoke test transformable0(L) -> @@ -977,3 +981,24 @@ not_transformable15(_, V) -> id(I) -> I. + +%% Check that we don't try to private_append to something created by +%% bs_create_bin `append`, _, `<<>>`, ... +bs_create_bin_on_literal() -> +%ssa% () when post_ssa_opt -> +%ssa% X = bs_init_writable(_), +%ssa% Y = bs_create_bin(private_append, _, X, ...), +%ssa% Z = bs_create_bin(private_append, _, Y, ...), +%ssa% ret(Z). + << + << + (maybe + 2147483647 ?= ok + else + <<_>> -> + ok; + _ -> + <<>> + end)/bytes + >>/binary + >>. diff --git a/lib/compiler/test/beam_ssa_check_SUITE_data/sanity_checks.erl b/lib/compiler/test/beam_ssa_check_SUITE_data/sanity_checks.erl index ae4bb28eea..47c60fd8d6 100644 --- a/lib/compiler/test/beam_ssa_check_SUITE_data/sanity_checks.erl +++ b/lib/compiler/test/beam_ssa_check_SUITE_data/sanity_checks.erl @@ -18,6 +18,8 @@ -module(sanity_checks). +-compile(no_ssa_opt_private_append). + -export([check_fail/0, check_wrong_pass/0, check_xfail/0, @@ -33,7 +35,9 @@ t25/0, t26/0, t27/0, t28/0, t29/0, t30/0, t31/0, t32/1, t33/1, t34/1, t35/1, t36/0, t37/0, t38/0, t39/1, - t40/0, t41/0, t42/0, t43/0, t44/0]). + t40/0, t41/0, t42/0, t43/0, t44/0, + + check_env/0]). %% Check that we do not trigger on the wrong pass check_wrong_pass() -> @@ -325,3 +329,13 @@ t44() -> %ssa% () when post_ssa_opt -> %ssa% _ = call(fun e:f0/1, {...}). e:f0({}). + +%% Ensure bug which trashed the environment after matching a literal +%% bitstring stays fixed. +check_env() -> +%ssa% () when post_ssa_opt -> +%ssa% X = bs_create_bin(append, _, <<>>, ...), +%ssa% ret(X). + A = <<>>, + B = ex:f(), + <<A/binary, B/binary>>. diff --git a/lib/compiler/vsn.mk b/lib/compiler/vsn.mk index 0c4eae4d45..fa46ea4097 100644 --- a/lib/compiler/vsn.mk +++ b/lib/compiler/vsn.mk @@ -1 +1 @@ -COMPILER_VSN = 8.2.5 +COMPILER_VSN = 8.2.6 diff --git a/lib/os_mon/doc/src/notes.xml b/lib/os_mon/doc/src/notes.xml index 1fac53d330..439c1e839a 100644 --- a/lib/os_mon/doc/src/notes.xml +++ b/lib/os_mon/doc/src/notes.xml @@ -31,6 +31,23 @@ </header> <p>This document describes the changes made to the OS_Mon application.</p> +<section><title>Os_Mon 2.8.2</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + Avoid error report from failing <c>erlang:port_close</c> + at shutdown of <c>cpu_sup</c> and <c>memsup</c>. Bug + exists since OTP 25.3 (os_mon-2.8.1).</p> + <p> + Own Id: OTP-18559 Aux Id: ERIERL-942 </p> + </item> + </list> + </section> + +</section> + <section><title>Os_Mon 2.8.1</title> <section><title>Fixed Bugs and Malfunctions</title> diff --git a/lib/os_mon/vsn.mk b/lib/os_mon/vsn.mk index 9e64a83612..d6878e6773 100644 --- a/lib/os_mon/vsn.mk +++ b/lib/os_mon/vsn.mk @@ -1 +1 @@ -OS_MON_VSN = 2.8.1 +OS_MON_VSN = 2.8.2 diff --git a/lib/wx/c_src/Makefile.in b/lib/wx/c_src/Makefile.in index 87fc0354b6..6371f401c0 100644 --- a/lib/wx/c_src/Makefile.in +++ b/lib/wx/c_src/Makefile.in @@ -199,7 +199,11 @@ release_spec: opt $(INSTALL_PROGRAM) $(TARGET_DIR)/wxe_driver$(SO_EXT) "$(RELSYSDIR)/priv/" $(INSTALL_PROGRAM) $(TARGET_DIR)/erl_gl$(SO_EXT) "$(RELSYSDIR)/priv/" ifneq ($(WEBVIEW_LOADER_DLL_ORIG),) - $(INSTALL_PROGRAM) $(WEBVIEW_LOADER_DLL_DEST) "$(RELSYSDIR)/priv/" + $(INSTALL_PROGRAM) $(WEBVIEW_LOADER_DLL_DEST) "$(RELSYSDIR)/priv/" +endif +ifeq ($(SYS_TYPE),win32) + $(INSTALL_PROGRAM) $(TARGET_DIR)/wxe_driver.pdb "$(RELSYSDIR)/priv/" + $(INSTALL_PROGRAM) $(TARGET_DIR)/erl_gl.pdb "$(RELSYSDIR)/priv/" endif release_docs_spec: diff --git a/otp_versions.table b/otp_versions.table index 0032616639..9da37263b9 100644 --- a/otp_versions.table +++ b/otp_versions.table @@ -1,3 +1,4 @@ +OTP-25.3.2 : compiler-8.2.6 erts-13.2.2 os_mon-2.8.2 # asn1-5.0.21 common_test-1.24 crypto-5.1.4 debugger-5.3.1 dialyzer-5.0.5 diameter-2.2.7 edoc-1.2 eldap-1.2.11 erl_docgen-1.4 erl_interface-5.3.2 et-1.6.5 eunit-2.8.2 ftp-1.1.4 inets-8.3.1 jinterface-1.13.2 kernel-8.5.4 megaco-4.4.3 mnesia-4.21.4 observer-2.14 odbc-2.14 parsetools-2.4.1 public_key-1.13.3 reltool-0.9.1 runtime_tools-1.19 sasl-4.2 snmp-5.13.5 ssh-4.15.3 ssl-10.9.1 stdlib-4.3.1 syntax_tools-3.0.1 tftp-1.0.4 tools-3.5.3 wx-2.2.2 xmerl-1.3.31 : OTP-25.3.1 : compiler-8.2.5 crypto-5.1.4 eldap-1.2.11 erl_interface-5.3.2 erts-13.2.1 inets-8.3.1 snmp-5.13.5 ssl-10.9.1 stdlib-4.3.1 wx-2.2.2 # asn1-5.0.21 common_test-1.24 debugger-5.3.1 dialyzer-5.0.5 diameter-2.2.7 edoc-1.2 erl_docgen-1.4 et-1.6.5 eunit-2.8.2 ftp-1.1.4 jinterface-1.13.2 kernel-8.5.4 megaco-4.4.3 mnesia-4.21.4 observer-2.14 odbc-2.14 os_mon-2.8.1 parsetools-2.4.1 public_key-1.13.3 reltool-0.9.1 runtime_tools-1.19 sasl-4.2 ssh-4.15.3 syntax_tools-3.0.1 tftp-1.0.4 tools-3.5.3 xmerl-1.3.31 : OTP-25.3 : common_test-1.24 compiler-8.2.4 crypto-5.1.3 debugger-5.3.1 dialyzer-5.0.5 erl_interface-5.3.1 erts-13.2 eunit-2.8.2 ftp-1.1.4 inets-8.3 jinterface-1.13.2 kernel-8.5.4 megaco-4.4.3 mnesia-4.21.4 os_mon-2.8.1 public_key-1.13.3 reltool-0.9.1 snmp-5.13.4 ssh-4.15.3 ssl-10.9 stdlib-4.3 syntax_tools-3.0.1 tftp-1.0.4 xmerl-1.3.31 # asn1-5.0.21 diameter-2.2.7 edoc-1.2 eldap-1.2.10 erl_docgen-1.4 et-1.6.5 observer-2.14 odbc-2.14 parsetools-2.4.1 runtime_tools-1.19 sasl-4.2 tools-3.5.3 wx-2.2.1 : OTP-25.2.3 : erts-13.1.5 inets-8.2.2 ssh-4.15.2 ssl-10.8.7 # asn1-5.0.21 common_test-1.23.3 compiler-8.2.3 crypto-5.1.2 debugger-5.3 dialyzer-5.0.4 diameter-2.2.7 edoc-1.2 eldap-1.2.10 erl_docgen-1.4 erl_interface-5.3 et-1.6.5 eunit-2.8.1 ftp-1.1.3 jinterface-1.13.1 kernel-8.5.3 megaco-4.4.2 mnesia-4.21.3 observer-2.14 odbc-2.14 os_mon-2.8 parsetools-2.4.1 public_key-1.13.2 reltool-0.9 runtime_tools-1.19 sasl-4.2 snmp-5.13.3 stdlib-4.2 syntax_tools-3.0 tftp-1.0.3 tools-3.5.3 wx-2.2.1 xmerl-1.3.30 : diff --git a/system/doc/general_info/upcoming_incompatibilities.xml b/system/doc/general_info/upcoming_incompatibilities.xml index 04ab4459c0..8538067b57 100644 --- a/system/doc/general_info/upcoming_incompatibilities.xml +++ b/system/doc/general_info/upcoming_incompatibilities.xml @@ -53,6 +53,7 @@ </section> <section> + <marker id="maybe_expr"/> <title>Feature maybe_expr will be enabled by default</title> <p> As of OTP 27, the <c>maybe_expr</c> feature will be approved @@ -119,6 +120,65 @@ the regular expression before matching with it.</p></item> </list> </section> + + <section> + <marker id="float_matching"/> + <title>0.0 and -0.0 will no longer be exactly equal</title> + + <p>Currently, the floating point numbers <c>0.0</c> and <c>-0.0</c> + have distinct internal representations. That can be seen if they are + converted to binaries:</p> + <pre> +1> <input><<0.0/float>>.</input> +<<0,0,0,0,0,0,0,0>> +2> <input><<-0.0/float>>.</input> +<<128,0,0,0,0,0,0,0>></pre> + + <p>However, when they are matched against each other or compared + using the <c>=:=</c> operator, they are considered to be + equal. Thus, <c>0.0 =:= -0.0</c> currently returns + <c>true</c>.</p> + + <p>In Erlang/OTP 27, <c>0.0 =:= -0.0</c> will return <c>false</c>, and matching + <c>0.0</c> against <c>-0.0</c> will fail. When used as map keys, <c>0.0</c> and + <c>-0.0</c> will be considered to be distinct.</p> + + <p>The <c>==</c> operator will continue to return <c>true</c> + for <c>0.0 == -0.0</c>.</p> + + <p>To help to find code that might need to be revised, in OTP 27 + there will be a new compiler warning when matching against + <c>0.0</c> or comparing to that value using the <c>=:=</c> + operator. The warning can be suppressed by matching against + <c>+0.0</c> instead of <c>0.0</c>.</p> + + <p>We plan to introduce the same warning in OTP 26.1, but by default it + will be disabled.</p> + </section> + + <section> + <marker id="singleton_typevars"/> + <title>Singleton type variables will become a compile-time error</title> + + <p>Before Erlang/OTP 26, the compiler would silenty accept the + following spec:</p> + + <pre> +-spec f(Opts) -> term() when + Opts :: {ok, Unknown} | {error, Unknown}. +f(_) -> error.</pre> + + <p>In OTP 26, the compiler emits a warning pointing out that the type variable + <c>Unknown</c> is unbound:</p> + + <pre> +t.erl:6:18: Warning: type variable 'Unknown' is only used once (is unbound) +% 6| Opts :: {ok, Unknown} | {error, Unknown}. +% | ^</pre> + + <p>In OTP 27, that warning will become an error.</p> + </section> + </section> <section> |