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

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

--- ai05s/ai05-0068-1.txt	2007/12/13 04:39:37	1.2
+++ ai05s/ai05-0068-1.txt	2008/05/10 05:14:33	1.3
@@ -1,4 +1,4 @@
-!standard 3.9.3(3/2)                                        07-11-29    AI05-0068-1/02
+!standard 3.9.3(3/2)                                        08-04-18    AI05-0068-1/03
 !standard 3.9.3(4/2)
 !standard 3.9.3(5/2)
 !standard 3.9.3(6/2)
@@ -9,7 +9,7 @@
 !priority Medium
 !difficulty Hard
 !qualifier Clarification
-!subject Inherited subprograms may be both abstract and requires overriding
+!subject Inherited subprograms may be both abstract and require overriding
 
 !summary
 
@@ -20,27 +20,27 @@
 
 Consider the following:
 
- 	package P is
- 	   type I is interface;
- 	   procedure Op (X : I) is abstract;
- 	end P;
+   package P is
+      type I is interface;
+      procedure Op (X : I) is abstract;
+   end P;
  
- 	with P;
-        package Q is
- 	   type T is abstract new P.I with private;
- 	   -- Op inherited here.
- 	private
- 	   type T is new P.I with null record;
-           procedure Op (X : T) is null;
- 	end Q;
-
-        with Q;
-        package R is
- 	   type T2 is new Q.T with null record;
- 	   -- Legal? (No.) Op inherited here, but how?
- 	end R;
+   with P;
+   package Q is
+      type T is abstract new P.I with private;
+      -- Op inherited here.
+   private
+      type T is new P.I with null record;
+      procedure Op (X : T) is null;
+   end Q;
+
+   with Q;
+   package R is
+      type T2 is new Q.T with null record;
+      -- Legal? (No.) Op inherited here, but how?
+   end R;
 
-3.9.3(4/2) talks about types, not views. That would seem to imply that Q.Op is "requires
+3.9.3(4/2) talks about types, not views. That would seem to imply that Q.Op "requires
 overriding". When that is inherited, it is inherited as a concrete routine and thus R is
 legal.
 
@@ -62,7 +62,7 @@
 want that.
 
 Note that this implies that whether an inherited subprogram is abstract or concrete
-depends on the view of the type that it was inherited for. In the case of Q, Q.Op in the
+depends on the view of the type that it was inherited from. In the case of Q, Q.Op in the
 visible part is abstract, while Q.Op in the private part is concrete. That is, R is
 illegal since it is an unrelated unit, but if R was renamed to be a private child of Q,
 then it would be legal.
@@ -71,16 +71,16 @@
 a "requires overriding" subprogram is illegal (this is the so-called "squirreling rename").
 Given the fact that abstractness depends on the view:
 
- 	with P;
-        package S is
- 	   type T is abstract new P.I with private;
- 	   -- Op inherited here.
-           procedure Org_Op1 (X : T) renames Op; -- Legal.
- 	private
- 	   type T is new P.I with null record;
-           procedure Org_Op2 (X : T) renames Op; -- Illegal.
-           procedure Op (X : T) is null;
- 	end S;
+   with P;
+   package S is
+      type T is abstract new P.I with private;
+      -- Op inherited here.
+      procedure Org_Op1 (X : T) renames Op; -- Legal.
+   private
+      type T is new P.I with null record;
+      procedure Org_Op2 (X : T) renames Op; -- Illegal.
+      procedure Op (X : T) is null;
+   end S;
 
 The first rename is legal because it is renaming an abstract subprogram, the second is
 illegal because it is renaming a "requires overriding" subprogram.
@@ -96,10 +96,8 @@
 
 [Note: this is a condensed version of a private thread. - ED.]
 
-John asked if:
+John asked if the following example is legal:
 
-Consider
- 
 package P is
    type T is abstract tagged private;
    procedure Op(X: T) is abstract;
@@ -109,8 +107,10 @@
          C: Integer;
       end record;
 end P;
+
+AARM 3.9.3(3.b) says it is not. What rule makes this illegal?
 
-AARM 3.9.3(3.b) says it is not.
+The reply was:
 
 The full type is illegal because it violates 3.9.3(3): "If it [an abstract subprogram]
 is a primitive subprogram of a tagged type, then the tagged type shall be abstract."

Questions? Ask the ACAA Technical Agent