comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: A proposal for formal packages matching
Date: Mon, 15 Dec 2008 11:21:30 +0100
Date: 2008-12-15T11:21:30+01:00	[thread overview]
Message-ID: <ugbgacg90vkd.1fijdixn7a5z4.dlg@40tude.net> (raw)

There seems one overlooked thing in the rules controlling matching formal
packages. An instance of generic child package does not match as an
instance of the generic parent.

I mean the following:

generic
package Generic_A is
end Generic_A;

package A is new Generic_A;

generic
package Generic_A.Generic_B is
end Generic_A.Generic_B;

package AB is new A.Generic_B;

generic
   with package A is new Generic_A (<>);
package Generic_Foo is
end Generic_Foo;

package Foo is new Generic_Foo (AB);
   -- Error: AB is not an instance of Generic_A

Semantically, AB being an extension of Generic_A can be considered an
instance of.

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



             reply	other threads:[~2008-12-15 10:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-15 10:21 Dmitry A. Kazakov [this message]
2008-12-15 12:13 ` A proposal for formal packages matching Ludovic Brenta
2008-12-15 13:29   ` Dmitry A. Kazakov
2008-12-15 15:43     ` Ludovic Brenta
2008-12-15 19:21       ` Dmitry A. Kazakov
2008-12-16  2:09   ` Randy Brukardt
2008-12-16  8:34     ` Dmitry A. Kazakov
replies disabled

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