CVS difference for ai12s/ai12-0338-1.txt

Differences between 1.2 and version 1.3
Log of other versions for file ai12s/ai12-0338-1.txt

--- ai12s/ai12-0338-1.txt	2019/07/03 03:46:34	1.2
+++ ai12s/ai12-0338-1.txt	2019/07/03 04:18:31	1.3
@@ -1,5 +1,7 @@
-!standard 7.3.2(21/4)                                    19-06-16  AI12-0338-1/02
+!standard 7.3.2(20/5)                                    19-07-02  AI12-0338-1/03
 !class binding interpretation 19-06-15
+!status Amendment 1-2012 19-07-02
+!status ARG Approved 10-0-0  19-06-16
 !status work item 19-06-15
 !status received 19-06-14
 !priority Low
@@ -72,23 +74,26 @@
 
 !wording
 
-Add before 7.3.2(21/4):
+Replace the deleted 7.3.2(20/5) with:
 
 If the nominal type of a formal parameter (or the designated nominal type of 
-an access-to-object parameter) is incomplete at the point of the declaration 
-of the callable entity, and if the completion of that incomplete type does 
-not occur in the same declaration list as the incomplete declaration, then 
-for purposes of the preceding rules the nominal type is considered to have 
-no parts of type T.
+an access-to-object parameter or result) is incomplete at the point of the 
+declaration of the callable entity, and if the completion of that incomplete 
+type does not occur in the same declaration list as the incomplete declaration,
+then  for purposes of the preceding rules the nominal type is considered to 
+have no parts of type T.
+
+Add after AARM 7.3.2(23.f/5):
+
+   Invariant checks are not performed for parts of incomplete types when the
+   completion is not available. For this leak to occur for a type T that has a 
+   type invariant and is declared in a package P, one has to use a limited with
+   on a package that has P in its semantic closure, and then use a type from
+   that package as a parameter or result of a boundary subprogram for T (or as 
+   the designated type of a parameter or result of such a subprogram).
 
-modify 7.3.2(23.a/5)
-     ...  is not itself externally visible. { Incomplete types or
-     class-wide types may be used to produce cases where subcomponents
-     are not checked. } These cases represent holes ...
-
 !discussion
 
-
 To the extent that this obscure corner case has any importance at all, a check 
 failure would be preferable from the user's perspective because it prevents a 
 "bad" value from leaking out.
@@ -113,6 +118,20 @@
 type is unavailable and heroic measures would be required to generate a type 
 invariant check.
 
+Therefore, we define this as a leak similar to the class-wide leak.
+
+!corrigendum 7.3.2(20/3)
+
+@drepl
+The check is performed on each such part of type @i<T>.
+@dby
+If the nominal type of a formal parameter (or the designated nominal type of 
+an access-to-object parameter or result) is incomplete at the point of the 
+declaration of the callable entity, and if the completion of that incomplete 
+type does not occur in the same declaration list as the incomplete declaration,
+then  for purposes of the preceding rules the nominal type is considered to 
+have no parts of type @i<T>.
+
 !ASIS
 
 No ASIS effect.
@@ -214,5 +233,34 @@
      ...  is not itself externally visible. { Incomplete types or
      class-wide types may be used to produce cases where subcomponents
      are not checked. } These cases represent holes ...
+
+****************************************************************
+
+From: Randy Brukardt
+Sent: Tuesday, July 2, 2019  11:06 PM
+
+[A for-the-record note.]
+
+[In relation to what is now AI12-0338-1.]
+
+> !wording
+> 
+> Add before 7.3.2(21/4):
+> 
+> If the nominal type of a formal parameter (or the designated 
+> nominal type of an access-to-object parameter) is incomplete 
+> at the point of the declaration of the callable entity, and 
+> if the completion of that incomplete type does not occur in 
+> the same declaration list as the incomplete declaration, then 
+> for purposes of the preceding rules the nominal type is 
+> considered to have no parts of type T.
+
+This placement would have this after the unrelated rule of 7.3.2(20.1/4). I
+believe Steve meant to put it before that rule, or really to use the currently
+deleted paragraph of 7.3.2(20/3) to hold this rule.
+
+Also, not sure why this rule doesn't mention the designated nominal type of 
+an access-to-object result, it's certainly legal to define such an access type.
+So I added "or result" immediately before the closing paren.
 
 ****************************************************************

Questions? Ask the ACAA Technical Agent