CVS difference for ai05s/ai05-0126-1.txt
--- ai05s/ai05-0126-1.txt 2008/10/23 00:49:40 1.1
+++ ai05s/ai05-0126-1.txt 2008/12/02 06:01:19 1.2
@@ -1,13 +1,17 @@
-!standard 3.9.2(20/2) 08-10-22 AI05-0126-1/01
+!standard 3.9.2(20/2) 08-11-14 AI05-0126-1/02
+!standard 3.9.2(20.1/2)
+!standard 3.9.2(20.2/2)
!class binding interpretation 08-10-22
+!status Amendment 201Z 08-11-26
+!status ARG Approved 8-0-0 08-11-02
!status work item 08-10-22
!status received 08-10-03
-!subject Dispatching when there is no inherited operation
+!subject Dispatching when there is no declared operation
!summary
-When there is no corresponding operation inherited, dispatching executes the
-operation that the parent type would execute.
+When there is no corresponding inherited operation explicitly or implicitly
+declared, dispatching executes the operation that the parent type would execute.
!question
@@ -39,15 +43,16 @@
procedure Main is
X : Q.Child;
begin
- Oper (Obj);
+ P.Oper (X);
end Main;
How does the dispatching call Hidden (Obj) work? 3.9.2(20-20.2/2) says that the
"action performed is determined by the properties of the corresponding dispatching
operation of the specific type identified by the controlling tag value".
-But in this case, type Child has no operation Hidden. That operation is never
-inherited anywhere for type Child. Should the wording cover this case? (Yes.)
+But in this case, type Child has an inherited operation Hidden which exists but is
+is never implicitly declared anywhere for type Child. Should the wording cover
+this case? (Yes.)
!recommendation
@@ -55,24 +60,37 @@
!wording
-Modify 3.9.2(20/2) as follows:
+Replace 3.9.2(20/2-20.2/2) by:
For the execution of a call on a dispatching operation, the action performed
-is determined by the properties of the corresponding dispatching operation
-of the specific type identified by the controlling tag value. If the
-corresponding operation is explicitly declared for this type, even if the
-declaration occurs in a private part, then the action comprises an
-invocation of the explicit body for the operation. If the corresponding operation
-is implicitly declared for this type{, or there is no corresponding operation for
-this type}:
+is determined by the properties of the corresponding dispatching operation of
+the specific type identified by the controlling tag value:
-Replace the To Be Honest AARM note 3.9.2(20.a) with:
+* if the corresponding operation is explicitly declared for this type, Redundant:[even
+ if the declaration occurs in a private part], then the action comprises an
+ invocation of the explicit body for the operation;
+* if the corresponding operation is implicitly declared for this type and is
+ implemented by an entry or protected subprogram (see 9.1 and 9.4), then the
+ action comprises a call on this entry or protected subprogram, with the target
+ object being given by the first actual parameter of the call, and the actual
+ parameters of the entry or protected subprogram being given by the remaining
+ actual parameters of the call, if any;
+
+* otherwise, the action is the same as the action for the corresponding operation
+ of the parent type or progenitor type from which the operation is inherited.
+
+
+Replace the To Be Honest AARM note 3.9.2(20.a) with an AARM Ramification:
+
"Corresponding primitive operation" refers to the inheritance relationship
-between subprograms. If there is no inheritance relationship, the corresponding
-operation of the parent type is executed (an explicit body that happens to have
-the right name is not called). Thus, any explicit declaration for an inherited
-corresponding primitive operation has to be an overriding routine.
+between subprograms. Primitive operations are always inherited for a type T,
+but they may not be declared if the primitive operation is never visible within
+the immediate scope of the type T. If no corresponding operation is declared,
+the corresponding operation of the parent type is executed (an explicit body
+that happens to have the right name is never called). Thus, any explicit
+declaration for an inherited corresponding primitive operation has to be
+an overriding routine.
!discussion
@@ -85,9 +103,7 @@
AARM 3.9.2(20.a) refers to the original Ada 95 wording, and doesn't seem to be
necessary with the current wording. Thus we can replace it with new wording to
-explaing "corresponding primitive operation".
-
-****************************************************************
+explain "corresponding primitive operation".
!corrigendum 3.9.2(20/2)
@@ -101,14 +117,41 @@
of the explicit body for the operation. If the corresponding operation is
implicitly declared for this type:
@dby
-For the execution of a call on a dispatching operation, the action performed is
-determined by the properties of the corresponding dispatching operation of the
-specific type identified by the controlling tag value. If the corresponding
-operation is explicitly declared for this type, even if the
-declaration occurs in a private part, then the action comprises an invocation
-of the explicit body for the operation. If the corresponding operation is
-implicitly declared for this type, or there is no corresponding operation for
-this type:
+For the execution of a call on a dispatching operation, the action performed
+is determined by the properties of the corresponding dispatching operation of
+the specific type identified by the controlling tag value:
+
+@xbullet<if the corresponding operation is explicitly declared for this type,
+Redundant:[even if the declaration occurs in a private part], then the action
+comprises an invocation of the explicit body for the operation;>
+
+!corrigendum 3.9.2(20.1/2)
+
+@drepl
+@xbullet<if the operation is implemented by an entry or
+protected subprogram (see 9.1 and 9.4), then the action comprises a
+call on this entry or protected subprogram, with the target object being given
+by the first actual parameter of the call, and the actual parameters of the
+entry or protected subprogram being given by the remaining actual parameters of
+the call, if any;>
+@dby
+@xbullet<if the corresponding operation is implicitly declared for this type
+and is implemented by an entry or
+protected subprogram (see 9.1 and 9.4), then the action comprises a
+call on this entry or protected subprogram, with the target object being given
+by the first actual parameter of the call, and the actual parameters of the
+entry or protected subprogram being given by the remaining actual parameters of
+the call, if any;>
+
+!corrigendum 3.9.2(20.2/2)
+
+@drepl
+@xbullet<otherwise, the action is the same as the action for
+the corresponding operation of the parent type.>
+@dby
+@xbullet<otherwise, the action is the same as the action for
+the corresponding operation of the parent type or progenitor type from
+which the operation is inherited.>
!ACATS Test
Questions? Ask the ACAA Technical Agent