CVS difference for ais/ai-00196.txt

Differences between 1.7 and version 1.8
Log of other versions for file ais/ai-00196.txt

--- ais/ai-00196.txt	2002/10/29 20:24:57	1.7
+++ ais/ai-00196.txt	2002/12/04 23:43:37	1.8
@@ -1,7 +1,7 @@
-!standard 03.09.02 (17)                               02-06-19  AI95-00196/02
+!standard 03.09.02 (17)                               02-11-23  AI95-00196/03
 !class binding interpretation 98-03-27
 !status Amendment 200Y 02-10-23
-!status ARG approved 10-0-0  02-10-12
+!status ARG Approved 10-0-0  02-10-12
 !status work item 01-10-08
 !status received 98-03-27
 !priority Low
@@ -10,13 +10,12 @@
 
 !summary
 
-For the assignment of a tag-indeterminate dispatching call to a target
-of a class-wide type, the controlling tag value for the call is defined
-by the tag of the target. This case is addressed by the addition of a
-rule following paragraph 3.9.2(18).
+For the assignment of the result of a tag-indeterminate dispatching call to a
+target of a class-wide type, the controlling tag value for the call is defined
+by the tag of the target. This case is addressed by the addition of a rule
+following 3.9.2(18).
 
-Paragraphs 3.9.2(17-19) are also intended to apply to dispatching calls
-with no controlling operands.
+3.9.2(17-19) also applies to dispatching calls without controlling operands.
 
 !question
 
@@ -29,55 +28,56 @@
 
 Regardless of whether 3.9.2(17) includes calls to functions having
 no controlling operands, but having a controlling result, it appears that
-3.9.2(19) is at odds with 5.2(9).  The problem arises with any assignment
+3.9.2(19) conflicts with 5.2(9). The problem arises with any assignment
 whose expression is a call to a function having a tag-indeterminate
 controlling result.
 
 Consider the following:
 
-      package p1 is
-         type t is tagged null record ;
-         function func return t ;                  -- (1)
-      end p1 ;
-
-      with p1 ;
-      package p2 is
-         use p1 ;
-         type e is new t with null record ;
-         function func return e ;                  -- (2)
-      end p2 ;
-
-      with p1 ;
-      with p2 ;
-      procedure bummer_dude is
-      --
-         eee : p2.e ;
+      package P1 is
+         type T is tagged null record;
+         function Func return T;                  -- (1)
+      end P1;
+
+      with P1;
+      package P2 is
+         use P1;
+         type E is new T with null record;
+         function Func return E;                  -- (2)
+      end P2;
+
+      with P1;
+      with P2;
+      procedure Bummer is
 
-         procedure crash_and_burn (formal : in p1.t'class) is
-            local : p1.t'class := formal ;
+         Eee : P2.E ;
+
+         procedure Crash_and_Burn (Formal : in P1.T'Class) is
+            Local : P1.T'Class := Formal;
          begin
-            local := p1.func ;                     -- (3)
-         end crash_and_burn ;
+            Local := P1.Func;                     -- (3)
+         end Crash_and_Burn;
+
       begin
-         crash_and_burn (eee) ;                    -- (4)
-      end bummer_dude ;
+         Crash_and_Burn (Eee);                    -- (4)
+      end Bummer;
 
-The tag-indeterminate call to func at (3) is in question.  For the call
+The tag-indeterminate call to func at (3) is in question. For the call
 at (4), what is the body that will execute when the call at (3) is made?
-3.9.2(19) says it is p1.func (declared at (1)), and 5.2(9) says that it
-is p2.func (declared at (2)).
+3.9.2(19) says it is P1.Func (declared at (1)), and 5.2(9) says that it
+is P2.Func (declared at (2)).
 
 3.9.2(19) says that the controlling tag for the call is statically
-determined to be p1.t'tag, because the call is not a controlling operand
-of another call, and p1.func is a dispatching operation of type p1.t.
+determined to be P1.T'Tag, because the call is not a controlling operand
+of another call, and P1.Func is a dispatching operation of type P1.T.
 
-However, 5.2(9) contradicts this.  The target (local) is class-wide,
-and the expression (call to p1.func) is tag-indeterminate, so the
-controlling tag is taken from the tag of local, which is p2.e'tag.
+However, 5.2(9) contradicts this. The target (local) is class-wide,
+and the expression (call to P1.Func) is tag-indeterminate, so the
+controlling tag is taken from the tag of local, which is P2.E'Tag.
 
 This dilemma arises when the expression of an assignment statement is a
-call on a function with a tag-indeterminate controlling result.  How is
-this dilemma reconciled?  (The call at (3) will invoke p2.func.)
+call on a function with a tag-indeterminate controlling result. How is
+this dilemma reconciled? (The call at (3) will invoke P2.Func.)
 
 !recommendation
 
@@ -99,13 +99,13 @@
 !discussion
 
 Based on 5.2(9), it's clear that the controlling tag for a tag-indeterminate
-expression assigned to a class-wide target is intended to determined by the
-tag of the target object.  It was an oversight not to specify this case
+expression assigned to a class-wide target is intended to be determined by the
+tag of the target object. It was an oversight not to specify this case
 in 3.9.2.
 
 It was also intended that the rules of 3.9.2(17-19) apply to a call to a
 dispatching operation which has a controlling result and no controlling
-operands.  This is more in the nature of a confirmation, but might be
+operands. This is more in the nature of a confirmation, but might be
 made clearer by the addition of the phrase "if any" in 3.9.2(17), as occurs
 in the definition of tag-indeterminate names and expressions (cf. 3.9.2(6)).
 

Questions? Ask the ACAA Technical Agent