CVS difference for ais/ai-00044.txt
--- ais/ai-00044.txt 1998/09/30 00:17:09 1.1
+++ ais/ai-00044.txt 1999/07/21 03:10:57 1.2
@@ -1,5 +1,6 @@
-!standard 08.03 (09) 96-11-16 AI95-00044/04
+!standard 08.03 (09) 99-07-20 AI95-00044/05
!class binding interpretation 95-06-25
+!status Corrigendum 2000 99-07-20
!status WG9 approved 96-12-07
!status ARG approved 11-1-0 96-10-07
!status work item (letter ballot requested and failed) 96-09-15
@@ -11,7 +12,7 @@
!difficulty Medium
!subject Overriding by Implicit Declarations
-!summary 95-06-25
+!summary
For an explicit declaration of "=", the corresponding "/=" that is
implicitly declared (if any) overrides the predefined "/=" (if any).
@@ -20,7 +21,7 @@
implicit declaration of an inherited subprogram with the same
identifier.
-!question 95-06-25
+!question
8.3(9-13) does not cover the case of an implicitly declared "/=" that
corresponds to an explicitly declared "=" operator. Is it the intent
@@ -30,13 +31,13 @@
Is it the intent that a statement_identifier overrides an inherited
subprogram with the same name? (Yes.)
-!recommendation 95-06-25
+!recommendation
(See summary.)
-!wording 95-06-25
+!wording
-!discussion 95-06-25
+!discussion
For the "/=" issue, clearly it would be confusing if the predefined "/="
were visible instead of the one corresponding to the user-defined "=".
@@ -64,7 +65,7 @@
1) at most one of them is allowed to be a non-overridable declaration;
- 2) a non-overridable declaration overrides an overridable declaration,
+ 2) a non-overridable declaration overrides an overridable declaration,
independent of which comes first;
3) an inherited subprogram overrides a predefined operator,
@@ -72,8 +73,37 @@
4) for those pairs for which (1) to (3) don't apply, a later
overridable declaration overrides an earlier one.
+
+!corrigendum 8.03(9)
+
+@drepl
+Two homographs are not generally allowed immediately within the same
+declarative region unless one @i<overrides> the other (see Legality Rules below).
+A declaration overrides another homograph that occurs immediately within the
+same declarative region in the following cases:
+@dby
+Two homographs are not generally allowed immediately within the same
+declarative region unless one @i<overrides> the other (see Legality Rules
+below). The only declarations that are @i<overridable> are the implicit
+declarations for predefined operators or inherited primitive subprograms.
+A declaration overrides another homograph that occurs immediately within
+the same declarative region in the following cases:
+
+!corrigendum 8.03(10)
+
+@drepl
+@xbullet<An explicit declaration overrides an implicit declaration of a
+primitive subprogram, regardless of which declaration occurs first;>
+@dby
+@xbullet<A declaration that is not overridable overrides one that is
+overridable, regardless of which declaration occurs first;>
+
+!ACATS test
+For the first part of this ruling, tests C67002A.Ada, C67002D.Ada, etc. check
+the overriding of "=". For the second part of this ruling, test B83033B.Ada
+checks that the rule is enforced.
-!appendix 95-08-19
+!appendix
!section 8.3(9)
!section 6.6(6)
@@ -154,7 +184,7 @@
The second one, in 95-5214.e, was talking about the implicit
declaration of a label overriding an inherited subprogram.
-We struggled many times with the fact that the overriding
+We struggled many times with the fact that the overriding
rules were related to whether or not a declaration was implicit.
I believe now that the "implicitness" should be irrelevant.
The new model I would recommend is as follows:
@@ -167,12 +197,12 @@
To be precise:
- If there are two or more declarations that occur immediately within the
+ If there are two or more declarations that occur immediately within the
same declarative region which are homographs, then for these homographs:
1) at most one of them is allowed to be a non-overridable declaration;
- 2) a non-overridable declaration overrides an overridable declaration,
+ 2) a non-overridable declaration overrides an overridable declaration,
independent of which comes first;
3) an inherited subprogram overrides a predefined operator,
@@ -182,10 +212,10 @@
overridable declaration overrides an earlier one.
I believe this will solve the above two problems, and
-eliminate the funny games we have had to play to specify
+eliminate the funny games we have had to play to specify
whether a given declaration is implicit or explicit, which
-are particular confusing when talking about declarations
-inside of instances, declarations of labels, and declarations
+are particular confusing when talking about declarations
+inside of instances, declarations of labels, and declarations
of "/=".
-Tuck
Questions? Ask the ACAA Technical Agent