CVS difference for ai22s/ai22-0053-1.html

Differences between 1.3 and version 1.4
Log of other versions for file ai22s/ai22-0053-1.html

--- ai22s/ai22-0053-1.html	2023/03/23 07:47:03	1.3
+++ ai22s/ai22-0053-1.html	2023/05/27 07:11:57	1.4
@@ -1,4 +1,4 @@
-<html><head><meta content="text/html; charset=UTF-8" http-equiv="content-type"><title>AI22-0053-1/03</title>
+<html><head><meta content="text/html; charset=UTF-8" http-equiv="content-type"><title>AI22-0053-1/04</title>
 <style type="text/css">
 table td,table th{padding:0}
 BODY.body{background-color:#ffffff; max-width:468pt; padding:72pt 72pt 72pt 72pt}
@@ -11,12 +11,13 @@
 P.text{margin-bottom:0; margin-top:0; margin-left:0; margin-right:0; padding-top:0pt; color:#000000; font-size:11pt; padding-bottom:0pt; font-family:"Arial","Liberation Sans",sans-serif; line-height:1.15; text-align:left; font-weight:400; text-decoration:
none; vertical-align:baseline; font-style:normal}
 P.txts{margin-bottom:0; margin-top:0; margin-left:0; margin-right:0; padding-top:0pt; color:#000000; font-size:11pt; padding-bottom:11pt; font-family:"Arial","Liberation Sans",sans-serif; line-height:1.15; text-align:left; font-weight:400; text-decoration
:none; vertical-align:baseline; font-style:normal}
 P.inds{margin-bottom:0; margin-top:0; margin-left:24pt; margin-right:0; padding-top:0pt; color:#000000; font-size:11pt; padding-bottom:11pt; font-family:"Arial","Liberation Sans",sans-serif; line-height:1.15; text-align:left; font-weight:400; text-decorat
ion:none; vertical-align:baseline; font-style:normal}
+SPAN.ins{color:#007700}
 P.l3h{margin-bottom:0; margin-top:0; margin-left:0; margin-right:0;color:#000000;font-size:26pt;font-family:"Arial","Liberation Sans",sans-serif; padding-top:0pt; padding-bottom:3pt; line-height:1.15; page-break-after:avoid; orphans:2; widows:2; text-alig
n:left; font-weight:400; text-decoration:none; vertical-align:baseline; font-style:normal}
 SPAN.k5w{background-color:#f1c232}
 </style>
 </head><body class="body"><p class="l3h">AI22-0053-1</p>
 <p class="head">!standard 4.5.2(13) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;23-03-23 &nbsp;AI22-0053-1/03</p>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;23-05-19 &nbsp;AI22-0053-1/04</p>
 <p class="head">!standard 4.5.2(15/5)</p>
 <p class="head">!class binding interpretation 22-10-27</p>
 <p class="head">!status work item 22-10-27</p>
@@ -108,8 +109,17 @@
 <h2 class="head">!recommendation</h2>
 <p class="text">(See Summary.)</p>
 <h2 class="head">!wording</h2>
+<p class="inst">Modify 4.5.2(9.8/5):</p>
+<p class="word">If the profile of an explicitly declared primitive equality operator of an untagged
+record type is type conformant with that of the corresponding predefined equality operator, the
+declaration shall occur before the type is frozen. In addition, no type shall have been derived
+from the untagged record type before the declaration of the primitive equality operator.
+<span class="ins">{If the untagged record type is declared immediately within the visible part of a
+package, and the overriding primitive equality operator is explicitly declared within the private
+part of the package, the operator shall be subtype conformant with the predefined or inherited
+operator that it overrides.}</span> In addition to the places where Legality Rules normally apply
+(see 12.3), this rule applies also in the private part of an instance of a generic unit. </p>
 <p class="inst">Add after 4.5.2(13):</p>
-
 <p class="wrds">For an untagged record type, when outside the immediate scope of the type, any call
 on a primitive equals operator conformant with the profile of the predefined equals operator of the
 type, will invoke the body associated with the corresponding primitive equals operator visible at
@@ -136,27 +146,23 @@
 inconsistency (a runtime incompatibility). In particular, existing client code would now get the
 (hidden) overriding &quot;=&quot; rather than the predefined &quot;=&quot;. AI12-0101-1 argues
 fairly persuasively that this inconsistency is most likely fixing a bug.</p>
-
-<p class="txts">The proposed rule only hides predefined equality after the freezing point of a
-type. Any attempt to call equals will freeze the associated type, so this does not cause any
-anomalies. But it does allow using a squirreling rename to name the actual predefined equality for
-an untagged record type. This provides a work-around in the unusual case that one needs both the
-actual predefined equality and the overriding equality.</p>
 
-<p class="text">Note that the proposed rule only changes the effect of &quot;=&quot; for an
+<p class="txts">Note that the proposed rule only changes the effect of &quot;=&quot; for an
 untagged type declared in the visible part of a package specification, and which has an overriding
 &quot;=&quot; declared in the private part of that specification. Tagged types already call the
 overriding body regardless of where it appears, and if &quot;=&quot; is visibly overridden, the
 overriding body is always used for the call of &quot;=&quot; as well.</p>
+
+<p class="text">We require subtype conformance when the overriding occurs in the private part, to
+ensure that the same checks, if any, are performed at the call site.</p>
 <h2 class="head">!ACATS test</h2>
 
 <p class="text">An ACATS C-Test should check that an example like that in the !Issue gives the</p>
 <p class="text">expected results.</p>
 <h2 class="head">!appendix</h2>
 <p class="txts">This issue was originally raised by Steve Baird privately. </p>
-
-<hr><p class="txts">&nbsp;</p>
 
+<hr><p class="text">&nbsp;</p>
 <p class="txts">Comment from Tucker Taft, March 23, 2023, 12:06 AM</p>
 
 <p class="txts">The third paragraph of the !discussion started:</p>

Questions? Ask the ACAA Technical Agent