CVS difference for ai05s/ai05-0073-1.txt
--- ai05s/ai05-0073-1.txt 2007/10/31 02:24:49 1.2
+++ ai05s/ai05-0073-1.txt 2007/12/13 04:39:38 1.3
@@ -1,6 +1,8 @@
-!standard 3.9.3(8/2) 07-10-24 AI05-0073-1/02
-!standard 3.9.3(10/2)
+!standard 3.9.3(8) 07-12-03 AI05-0073-1/03
+!standard 3.9.3(10)
+!standard 6.5(8/2)
!class binding interpretation 07-10-24
+!status ARG Approved 9-0-0 06-11-11
!status work item 07-10-24
!status received 07-10-09
!priority Medium
@@ -32,7 +34,7 @@
talks about functions. Moreover, it is possible to write a body for this generic by using
an abstract formal subprogram. But it is not useful.
-Also note that a similar package:
+Also note that a similar generic package:
generic
type T (<>) is abstract tagged private;
@@ -40,7 +42,7 @@
function Ft (X : T) return T;
end GP;
-Is illegal because it violates 3.9.3(8/2). Should the generic also be illegal? (Yes.)
+Is illegal because it violates 3.9.3(8/2). Should the generic function also be illegal? (Yes.)
(2) Consider:
package Pkg is
@@ -80,9 +82,9 @@
!wording
-Add to the end of 3.9.3(8/2):
+Add to the end of 3.9.3(8):
-If a function has an access result type designated an abstract type, then the function
+If a function has an access result type designating an abstract type, then the function
shall be abstract. A generic function shall not have an abstract result type or an
access result type designating an abstract type.
@@ -98,7 +100,7 @@
Add a new paragraph after 6.5(8/2):
If the result subtype of the function is defined by an access_definition designating a
-specific access type T, a check is made that the result value is null or the tag of
+specific tagged type T, a check is made that the result value is null or the tag of
the object designated by the result value identifies T. Constraint_Error is raised if
this check fails.
@@ -107,7 +109,7 @@
In order to fix the tag-indeterminate dispatching problem, we require that the designated
type of the result of such a function has the tag of the designated specific tagged type.
-This tag check on return is similar to the one that was be made for return-by-reference
+This tag check on return is similar to the one that was made for return-by-reference
types in Ada 95. This makes sense, since access result types are essentially a replacement
for that functionality.
@@ -115,7 +117,56 @@
access result type designating an abstract type is null. That's not useful, so
we make such functions illegal, just like functions that directly return an abstract type.
---!corrigendum 7.6.1(17.1/1)
+!corrigendum 3.9.3(8)
+
+@drepl
+The type of an @fa<aggregate>, or of an object created by an @fa<object_declaration>
+or an @fa<allocator>, or a generic formal object of mode @b<in>, shall not be abstract.
+The type of the target of an assignment operation (see 5.2) shall not be abstract.
+The type of a component shall not be abstract. If the result type of a function is
+abstract, then the function shall be abstract.
+@dby
+The type of an @fa<aggregate>, or of an object created by an @fa<object_declaration>
+or an @fa<allocator>, or a generic formal object of mode @b<in>, shall not be abstract.
+The type of the target of an assignment operation (see 5.2) shall not be abstract.
+The type of a component shall not be abstract. If the result type of a function is
+abstract, then the function shall be abstract. If a function has an access result type
+designating an abstract type, then the function shall be abstract. A generic function
+shall not have an abstract result type or an access result type designating an
+abstract type.
+
+!corrigendum 3.9.3(10)
+
+@drepl
+For an abstract type declared in a visible part, an abstract primitive subprogram
+shall not be declared in the private part, unless it is overriding an
+abstract subprogram implicitly declared in the visible part. For a tagged type
+declared in a visible part, a primitive function with a controlling result
+shall not be declared in the private part, unless it is overriding a function
+implicitly declared in the visible part.
+@dby
+For an abstract type declared in a visible part, an abstract primitive subprogram
+shall not be declared in the private part, unless it is overriding an
+abstract subprogram implicitly declared in the visible part. For a tagged type
+declared in a visible part, a primitive function with a controlling result or a
+controlling access result shall not be declared in the private part, unless it is
+overriding a function implicitly declared in the visible part.
+
+!corrigendum 6.5(8/2)
+
+@dinsa
+If the result type of a function is a specific
+tagged type, the tag of the return object is that
+of the result type. If the result type is class-wide, the tag of the
+return object is that of the value of the expression. A check is made that
+the accessibility level of the type identified by the tag of the result is
+not deeper than that of the master that elaborated the function body. If
+this check fails, Program_Error is raised.
+@dinst
+If the result subtype of the function is defined by an @fa<access_definition> designating a
+specific tagged type @i<T>, a check is made that the result value is null or the tag of
+the object designated by the result value identifies @i<T>. Constraint_Error is raised if
+this check fails.
!ACATS Test
Questions? Ask the ACAA Technical Agent