comp.lang.ada
 help / color / mirror / Atom feed
* "with private" required in generic formal type parameter
@ 1997-01-17  0:00 m193884
  1997-01-17  0:00 ` Robert A Duff
  0 siblings, 1 reply; 2+ messages in thread
From: m193884 @ 1997-01-17  0:00 UTC (permalink / raw)



I created a generic package with one generic parameter, like so:

generic
    type A is new B;
package C is ....

where B is a tagged type.

The compiler flagged the generic parameter with the following words:

"A record_extension_part shall be provided if and only if the parent type
is a tagged type"

I found the validity of this in LRM 12.5 and according to my reading the
compiler is correct.

What I'm curious about is:  _why_ is this restriction needed?  Doesn't the
compiler already know that the formal is tagged and the actual must be?  
My understanding is, moreover, that any actual must be derived from B.

I'm not arguing that it shouldn't be required, since it appears to enhance 
readability.  I'm just curious as to what compiler problem "with private" 
solves in this example that would be there without it.
-- 
James Squire           mailto:m193884 no junk mail allowed@csehp1.mdc.com
MDA Avionics Tools & Processes
McDonnell Douglas Aerospace              http://www.mdc.com/
Opinions expressed here are my own and NOT my company's
"We'll strike back and we'll strike back hard!"
	-- Londo, "Midnight on the Firing Line"
-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet




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

end of thread, other threads:[~1997-01-17  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-01-17  0:00 "with private" required in generic formal type parameter m193884
1997-01-17  0:00 ` Robert A Duff

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