comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Recursive parameters in generics
Date: Mon, 23 Jul 2007 20:20:54 +0200
Date: 2007-07-23T20:20:37+02:00	[thread overview]
Message-ID: <1k85hjmq18rzl$.k999u7frmtye.dlg@40tude.net> (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



             reply	other threads:[~2007-07-23 18:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-23 18:20 Dmitry A. Kazakov [this message]
2007-07-23 19:32 ` Recursive parameters in generics 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
replies disabled

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