comp.lang.ada
 help / color / mirror / Atom feed
* Recursive parameters in generics
@ 2007-07-23 18:20 Dmitry A. Kazakov
  2007-07-23 19:32 ` Maciej Sobczak
  2007-07-23 21:51 ` Adam Beneschan
  0 siblings, 2 replies; 8+ messages in thread
From: Dmitry A. Kazakov @ 2007-07-23 18:20 UTC (permalink / raw)


Hi there,

out of curiosity, recently experimenting with workarounds for generics, I
invented a construct, which puzzles me. Is the following legal:

generic
   S : String;
package A is
   S_Of : String renames S;
end A;
-----------------------------------
with A;
generic
   S : String;
   with package This_A is new A (S => S);
package B is
end B;
-----------------------------------
with A;
package My_A is new A (S => "whatever");
-----------------------------------
with My_A;
with B;
package My_B is
   new B (This_A => My_A, S => My_A.S_Of);
-----------------------------------
One could think that My_B would take S_Of from an instance of A and then
pass it back to A.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



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

end of thread, other threads:[~2007-07-25 15:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-23 18:20 Recursive parameters in generics Dmitry A. Kazakov
2007-07-23 19:32 ` Maciej Sobczak
2007-07-23 19:46   ` Dmitry A. Kazakov
2007-07-23 21:51 ` Adam Beneschan
2007-07-24  8:09   ` Dmitry A. Kazakov
2007-07-24 16:00     ` Adam Beneschan
2007-07-25  6:43       ` AW: " Grein, Christoph (Fa. ESG)
2007-07-25 15:13         ` Adam Beneschan

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