CVS difference for ai05s/ai05-0075-1.txt

Differences between 1.1 and version 1.2
Log of other versions for file ai05s/ai05-0075-1.txt

--- ai05s/ai05-0075-1.txt	2007/10/31 02:24:50	1.1
+++ ai05s/ai05-0075-1.txt	2007/11/07 06:32:42	1.2
@@ -188,3 +188,70 @@
 [The original question can be found in AI05-0051-1, from which this AI was split. - ED.]
 
 ****************************************************************
+
+From: Tucker Taft
+Sent: Tuesday, October 30, 2007  9:02 PM
+
+You use the phrase "This condition shall also hold ...".
+That's a new one, as far as I can remember, for the RM.
+I would suggest spelling it out, perhaps introduced by:
+
+   Similarly, if the designated subtype of the type of
+   the allocator is class-wide ... then the
+   accessibility level ... shall not be statically
+   deeper ...
+
+Alternatively, in this case, couldn't we combine the rules into:
+
+    If the type determined by the subtype_indication
+    or the qualified_expression of the allocator
+    has one or more access discriminants, then
+    the accessibility level of the anonymous access type of
+    each access discriminant, as determined by the
+    subtype_indication or qualified_expression of
+    the allocator, shall not be statically deeper
+    than that of the type of the allocator (see 3.10.2).
+
+****************************************************************
+
+Summary of a private thread about this AI:
+
+The AI has:
+
+A couple of other changes that really should have gone into AI05-0032
+are also included to handle static rejection of cases like
+
+  function Foo return T'Class is
+    type Local_Extension is new T with null record;
+  begin
+    return X : Local_Extension;
+  end Foo;
+
+---
+
+But this case is statically illegal, because "Local_Extension" does not
+have the same type as "T'Class" -- and 6.5(5.2/2) requires that for extended
+return statements (for functions with ordinary subtype returns -- there are
+different rules for access results).
+
+---
+
+But Steve is talking about AI05-0032, which allows
+the return_subtype_indication to determine any
+type that is *covered* by the result type of the
+function.
+
+---
+
+Why? That AI has never been approved. (And thus isn't in *my* AARM.) If it needs
+additional rules in order to work, then those rules need to be in that AI,
+not in some unrelated AI that happens to modify that paragraph. That's
+especially true as AI-32 is an Amendment AI, and may not be implemented for
+years if we don't vote to change the status.
+
+---
+
+Good point, Randy.  AI05-0032 should be amended
+instead of adding it to this AI.
+
+****************************************************************

Questions? Ask the ACAA Technical Agent