comp.lang.ada
 help / color / mirror / Atom feed
* A proposal for formal packages matching
@ 2008-12-15 10:21 Dmitry A. Kazakov
  2008-12-15 12:13 ` Ludovic Brenta
  0 siblings, 1 reply; 7+ messages in thread
From: Dmitry A. Kazakov @ 2008-12-15 10:21 UTC (permalink / 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



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

end of thread, other threads:[~2008-12-16  8:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-15 10:21 A proposal for formal packages matching Dmitry A. Kazakov
2008-12-15 12:13 ` 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

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