CVS difference for ais/ai-00391.txt

Differences between 1.2 and version 1.3
Log of other versions for file ais/ai-00391.txt

--- ais/ai-00391.txt	2004/11/17 00:52:59	1.2
+++ ais/ai-00391.txt	2004/12/07 21:07:52	1.3
@@ -1,12 +1,14 @@
-!standard 03.09.03    (04)                          04-11-13  AI95-00391/01
+!standard 03.09.03    (04)                          04-12-03  AI95-00391/02
 !standard 03.04       (27)
 !standard 03.09.01    (04)
 !standard 03.09.03    (06)
 !class amendment 04-11-13
+!status Amendment 200Y 04-12-03
+!status ARG Approved 5-0-5  04-11-20
 !status work item 04-11-13
 !status received 04-11-13
 !priority Medium
-!difficulty Hard
+!difficulty Medium
 !subject Functions with controlling results in null extensions
 
 !summary
@@ -34,7 +36,7 @@
 results.  For example, this does *not* work:
 
     generic
-       with type Element is private;
+       type Element is private;
     package Sets is
        type Set is tagged private;
        function Unit_Set(E : Element) return Set;
@@ -83,7 +85,7 @@
    extension, extended to the derived type with an
    extension_aggregate of the form:
 
-     (parent_function_result with null record)
+     (*<parent function result>* with null record)
 
    }
 
@@ -95,13 +97,14 @@
    has no known_discriminant_part and its record_extension_part
    includes no component_declarations.
 
-Modify 3.9.3(4) of AI-251:
+Modify 3.9.3(4):
 
-   If a type inherits a subprogram corresponding to an abstract
-   subprogram{, or a type other than a null extension inherits}
-   [or to] a function with a controlling result, then:
+   For a derived type, if the parent or abstract type has an abstract
+   formal subprogram, or a
+   {type other than a null extension inherits a} primitive function
+   with a controlling result, then:
 
-Modify 3.9.3(4):
+Modify 3.9.3(6):
 
    * Otherwise, the subprogram shall be overridden with a nonabstract
      subprogram {or, in the case of a private extension inheriting
@@ -133,8 +136,67 @@
 !example
 
 (** Missing **)
+
+!corrigendum 3.4(27)
+
+@drepl
+For the execution of a call on an inherited subprogram, a call on the
+corresponding primitive subprogram of the parent type is performed; the normal
+conversion of each actual parameter to the subtype of the corresponding formal
+parameter (see 6.4.1) performs any necessary type conversion as well. If the
+result type of the inherited subprogram is the derived type, the result of
+calling the parent's subprogram is converted to the derived type.
+@dby
+For the execution of a call on an inherited subprogram, a call on the
+corresponding primitive subprogram of the parent type is performed; the normal
+conversion of each actual parameter to the subtype of the corresponding formal
+parameter (see 6.4.1) performs any necessary type conversion as well. If the
+result type of the inherited subprogram is the derived type, the result of
+calling the parent's subprogram is converted to the derived type, or in the
+case of a null extension, extended to the derived type with an
+@fa<extension_aggregate> of the form:
+
+@xcode<(@i<<parent function result@>> @b<with null record>)>
+
+!corrigendum 3.9.1(4)
+
+@dinsa
+A type extension shall not be declared in a generic body if the parent type is
+declared outside that body.
+@dinst
+@i<@s8<Static Semantics>>
+
+A record extension is a @i<null extension> if its declaration
+has no @fa<known_discriminant_part> and its @fa<record_extension_part>
+includes no @fa<component_declaration>s.
+
+!corrigendum 3.9.3(4)
+
+@drepl
+For a derived type, if the parent or ancestor type has an abstract primitive
+subprogram, or a primitive function with a controlling result, then:
+@dby
+For a derived type, if the parent or abstract type has an abstract
+formal subprogram, or a type other than a null extension inherits a primitive
+function with a controlling result, then:
+
+!corrigendum 3.9.3(6)
+
+@drepl
+Otherwise, the subprogram shall be overridden with a nonabstract subprogram;
+for a type declared in the visible part of a package, the overriding may be
+either in the visible or the private part. However, if the type is a generic
+formal type, the subprogram need not be overridden for the formal type itself;
+a nonabstract version will necessarily be provided by the actual type.
+@dby
+Otherwise, the subprogram shall be overridden with a nonabstract subprogram or,
+in the case of a private extension inheriting a function with a controlling
+result, have a full type that is a null extension; for a type declared in the
+visible part of a package, the overriding may be either in the visible or the
+private part. However, if the type is a generic formal type, the subprogram
+need not be overridden for the formal type itself; a nonabstract version will
+necessarily be provided by the actual type.
 
---!corrigendum
 
 !ACATS test
 

Questions? Ask the ACAA Technical Agent