From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ab66185f2bca0483 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-15 13:51:16 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: michael.jackson5@virgin.net (Mike) Newsgroups: comp.lang.ada Subject: Re: Extension of non-limited type needs limited component Date: 15 Nov 2002 13:51:15 -0800 Organization: http://groups.google.com/ Message-ID: <2dbd76f3.0211151351.1f7956a0@posting.google.com> References: <2dbd76f3.0211130203.7d2d14fd@posting.google.com> <2dbd76f3.0211140126.5d233e41@posting.google.com> NNTP-Posting-Host: 81.98.82.55 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1037397076 17755 127.0.0.1 (15 Nov 2002 21:51:16 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 15 Nov 2002 21:51:16 GMT Xref: archiver1.google.com comp.lang.ada:30964 Date: 2002-11-15T21:51:16+00:00 List-Id: I originally wrote: > > How can assignment by upcasting the extended type possibly affect the > > limited component? > Bob replied: > If you have "type T2 is new T1 with...", then it is important that if T2 > is limited, then T1'Class must also be limited, because ":=" on T1'Class > objects will copy the T2 part, if the objects' tag happens to be T2'Tag. > > In Ada, T1'Class is limited if and only if T1 is limited. > So that means the whole hierarchy of tagged types has to be > either limited or nonlimited. I'm not sure if it would cause semantic > troubles to allow a nonlimited T1 with a limited T1'Class (assuming one > could invent some syntax for saying so). Interesting question. Aha. That is the reason! Thanks Bob, Mike