comp.lang.ada
 help / color / mirror / Atom feed
* limited type
@ 2005-09-30 16:06 adaman
  2005-09-30 17:09 ` Robert A Duff
  0 siblings, 1 reply; 2+ messages in thread
From: adaman @ 2005-09-30 16:06 UTC (permalink / raw)


Hello,

1°) I have a tagged limited type. I want also to derived this type
from an other not limited. Is is possible ? Example :
type T_Object is tagged private;
type T_Toto is new T_Object with limited private. Possible ????

2°) I have a tagged limited type. I have an other which derived from
this base type. Is this new type is limited ? Example :
type T_Object is tagged limited private;
type T_Toto is new T_Object with private. Is is Toto limited ????

thanks,




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

* Re: limited type
  2005-09-30 16:06 limited type adaman
@ 2005-09-30 17:09 ` Robert A Duff
  0 siblings, 0 replies; 2+ messages in thread
From: Robert A Duff @ 2005-09-30 17:09 UTC (permalink / raw)


"adaman" <nicolas.blanpain@fr.thalesgroup.com> writes:

> Hello,
> 
> 1�) I have a tagged limited type. I want also to derived this type
> from an other not limited. Is is possible ? Example :
> type T_Object is tagged private;
> type T_Toto is new T_Object with limited private. Possible ????

No.  Limited types are supposed to prevent copying, and this is intended
to be checkable at compile time.  If you could do the above, then you
could copy values of type T_Object'Class whose tag is T_Toto'Tag
-- a loophole.

> 2�) I have a tagged limited type. I have an other which derived from
> this base type. Is this new type is limited ? Example :
> type T_Object is tagged limited private;
> type T_Toto is new T_Object with private. Is is Toto limited ????

Yes, T_Toto is limited, for similar reasons as above.

- Bob



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

end of thread, other threads:[~2005-09-30 17:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-30 16:06 limited type adaman
2005-09-30 17:09 ` Robert A Duff

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