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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,ab66185f2bca0483 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-14 04:35:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!news.gtei.net!newsfeed.mathworks.com!oleane.net!oleane!nnrp.oleane.net!not-for-mail From: "Jean-Pierre Rosen" Newsgroups: comp.lang.ada Subject: Re: Extension of non-limited type needs limited component Date: Thu, 14 Nov 2002 13:33:07 +0100 Organization: Guest of France Telecom Oleane's newsreading service Message-ID: References: <2dbd76f3.0211130203.7d2d14fd@posting.google.com> <2dbd76f3.0211140126.5d233e41@posting.google.com> NNTP-Posting-Host: mailhost.axlog.fr X-Trace: s1.read.news.oleane.net 1037277067 8908 195.25.228.57 (14 Nov 2002 12:31:07 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Thu, 14 Nov 2002 12:31:07 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Xref: archiver1.google.com comp.lang.ada:30866 Date: 2002-11-14T13:33:07+01:00 List-Id: "Mike" a �crit dans le message news: 2dbd76f3.0211140126.5d233e41@posting.google.com... > How can assignment by upcasting the extended type possibly affect the > limited component? > Consider: X : T'class := Some_Dynamic_Function (1); Y : T'class := Some_Dynamic_Function (2); begin X := Y; At compile time, we know nothing about the specific type of the values in X and Y, but assuming that T is not limited, the assignment is allowed. If X and Y happen to have different tags at run time, the assignment will raise Constraint_Error, but that's all. If you were allowed to extend T with limited components, you would effectively copy the limited components! -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr