comp.lang.ada
 help / color / mirror / Atom feed
* problems with generic package
@ 2002-05-29  9:08 user
  2002-05-29 11:21 ` Preben Randhol
  2002-05-29 16:34 ` Stephen Leake
  0 siblings, 2 replies; 3+ messages in thread
From: user @ 2002-05-29  9:08 UTC (permalink / raw)


good morning

i have declared a generic package generic_set with the following 
specification:


generic
    type Element is private;

package Generic_Set is
...
end package;



then in another package i introduced a tagged type with two derived 
types like this:


type node is tagged null record;
type place is new node with record ... end record;
type transition is new node with record ... end record;


how is it possible to declare a new package set over the node type?
this declaration doesn't work :

package nodes_set is new generic_set(element => node'class);

error:

instantiation error
unconstrained subtype in component declaration
actual for "Element" must be a definite subtype


thanks for any help




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

end of thread, other threads:[~2002-05-29 16:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-29  9:08 problems with generic package user
2002-05-29 11:21 ` Preben Randhol
2002-05-29 16:34 ` Stephen Leake

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