comp.lang.ada
 help / color / mirror / Atom feed
* generic formal object of class-wide type
@ 1999-04-29  0:00 Matthew Heaney
  1999-04-29  0:00 ` Jean-Pierre Rosen
  1999-04-29  0:00 ` David C. Hoos, Sr.
  0 siblings, 2 replies; 6+ messages in thread
From: Matthew Heaney @ 1999-04-29  0:00 UTC (permalink / raw)


When I try to compile package Q (see below), I get this error:

q.ads:3:25: type of actual does not match type of "O"

Why?  

Generic formal object O (in GQ) is of type P.T'Class.  

Actual object O is of specific type NT, yes, but that type is in
T'Class.  So why isn't object O allowed as the actual for formal GC.O?




package P is
   type T is abstract tagged limited null record;
end;


package P.C is
   type NT is new T with null record;
   O : NT;
end;


with P;
generic
  O : in out P.T'Class;
package GQ is
end;


with GQ, P.C;
package Q is new GQ (P.C.O);







^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1999-04-30  0:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-04-29  0:00 generic formal object of class-wide type Matthew Heaney
1999-04-29  0:00 ` Jean-Pierre Rosen
1999-04-29  0:00 ` David C. Hoos, Sr.
1999-04-29  0:00   ` Matthew Heaney
1999-04-30  0:00     ` Robert A Duff
1999-04-30  0:00       ` Richard D Riehle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox