comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: limited type
Date: 30 Sep 2005 13:09:19 -0400
Date: 2005-09-30T13:09:19-04:00	[thread overview]
Message-ID: <wcc8xxeh48w.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: 1128096386.946431.122480@g14g2000cwa.googlegroups.com

"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



      reply	other threads:[~2005-09-30 17:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-30 16:06 limited type adaman
2005-09-30 17:09 ` Robert A Duff [this message]
replies disabled

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