CVS difference for ai05s/ai05-0082-1.txt
--- ai05s/ai05-0082-1.txt 2008/01/17 07:24:41 1.1
+++ ai05s/ai05-0082-1.txt 2008/03/07 06:15:19 1.2
@@ -1,5 +1,7 @@
-!standard 3.10.2(20/2) 08-01-16 AI05-0082-1/01
+!standard 3.10.2(19/2) 08-02-22 AI05-0082-1/02
+!standard 3.10.2(20)
!class binding interpretation 08-01-16
+!status ARG Approved 6-0-3 08-02-10
!status work item 08-01-16
!status received 08-01-11
!priority Medium
@@ -56,18 +58,26 @@
!recommendation
-(See Summary.)
+(See summary.)
!wording
-Modify 3.10.2(20) as follows:
-For determining whether one level is statically deeper than another when within
-a generic package[ body], the generic package is presumed to be instantiated at
-the same level as where it was declared; run-time checks are needed in the case
-of more deeply nested instantiations.{ A descendant of generic formal type is
-never statically deeper than another level when within a generic unit.}
+Modify 3.10.2(19/2) as follows:
+The statically deeper relationship does not apply to the accessibility
+level of the anonymous type of an access parameter specifying an
+access-to-object type{ nor does it apply to a descendant of a generic
+formal type}; that is, such an accessibility level is not
+considered to be statically deeper, nor statically shallower, than
+any other.
+
+Mark 3.10.2(20) as redundant in the AARM. Add an AARM Proof:
+
+A generic package does not introduce a new master, so it has the static
+level of its declaration; the rest follows from the other "statically deeper"
+rules.
+
AARM Note: This means that the static accessibility check of a type descended from
a generic formal type always succeeds when compiling the generic. But this rule
only applies to the generic, not to the instance.
@@ -93,33 +103,22 @@
Of course, the checks are still made in the specification of the generic instance, and
any checks skipped in the body will be checked at runtime.
-This is just an extension of 3.10.2(20) which says something similar about generic package
-bodies.
-
-We also change 3.10.2(20) (an "assume the best" rule) to apply to all of the generic package.
-Otherwise, generic specifications can be illegal while the body would be legal. For example:
-
- Obj : aliased Integer;
-
- generic
- package Gen is
- type Acc is access Integer;
- P1 : Acc := Obj'Access; -- OK?
- procedure Need_a_Body;
- end Gen;
-
- package body Gen is
- P2 : Acc := Obj'Access; -- OK (run-time check), by 3.10.2(20).
- procedure Need_a_Body is null;
- end Gen;
-
-[Editor's note: This seems OK without a change. I can't come up with an example where
-this (existing) rule would be needed in the body. But surely if it is needed in the
-body, it is also needed in the specification. The AARM unfortunately is no help as
-to the purpose of this rule.]
---!corrigendum 13.9(7)
+!corrigendum 3.10.2(19)
+@drepl
+The statically deeper relationship does not apply to the accessibility
+level of the anonymous type of an access parameter specifying an
+access-to-object type; that is, such an accessibility level is not
+considered to be statically deeper, nor statically shallower, than
+any other.
+@dby
+The statically deeper relationship does not apply to the accessibility
+level of the anonymous type of an access parameter specifying an
+access-to-object type nor does it apply to a descendant of a generic
+formal type; that is, such an accessibility level is not
+considered to be statically deeper, nor statically shallower, than
+any other.
!ACATS Test
Questions? Ask the ACAA Technical Agent