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 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-14 15:40:45 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-out.nuthinbutnews.com!propagator2-sterling!news-in-sterling.newsfeed.com!news-in.nuthinbutnews.com!newshosting.com!news-xfer1.atl.newshosting.com!uunet!dca.uu.net!ash.uu.net!world!news From: Robert A Duff Subject: Re: Extension of non-limited type needs limited component User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Sender: news@world.std.com (Mr Usenet Himself) Message-ID: Date: Thu, 14 Nov 2002 23:39:38 GMT Content-Type: text/plain; charset=us-ascii References: <2dbd76f3.0211130203.7d2d14fd@posting.google.com> <2dbd76f3.0211140126.5d233e41@posting.google.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Organization: The World Public Access UNIX, Brookline, MA Xref: archiver1.google.com comp.lang.ada:30912 Date: 2002-11-14T23:39:38+00:00 List-Id: michael.jackson5@virgin.net (Mike) writes: > How can assignment by upcasting the extended type possibly affect the > limited component? 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. - Bob