comp.lang.ada
 help / color / mirror / Atom feed
* Actual subprogram and generic instantiation in same unit
@ 2003-10-27 12:33 Oliver Kellogg
  2003-10-27 13:20 ` Duncan Sands
  0 siblings, 1 reply; 3+ messages in thread
From: Oliver Kellogg @ 2003-10-27 12:33 UTC (permalink / raw)


To my amazement the following compiles:

-- file: inst.ads
with Generic_Package;  -- takes a parameterless generic formal procedure P

package Lump is

   procedure Manipulate;

   package Instantiation is new Generic_Package (P => Manipulate);

end Lump;


Poor compiler has to instantiate a package using a procedure
whose body it has not yet seen...

Is that considered good Ada style?
Are there cases where this lumping together could cause problems?

Thanks,

Oliver M. Kellogg



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

end of thread, other threads:[~2003-10-30 13:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-27 12:33 Actual subprogram and generic instantiation in same unit Oliver Kellogg
2003-10-27 13:20 ` Duncan Sands
2003-10-30 13:35   ` Oliver Kellogg

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