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-Thread: 103376,154942e4f1d1b8e9,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!newsfeed.cw.net!cw.net!news-FFM2.ecrc.de!newsfeed00.sul.t-online.de!t-online.de!130.59.10.21.MISMATCH!kanaga.switch.ch!news-zh.switch.ch!switch.ch!cernne03.cern.ch!cern.ch!news From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Dynamically tagged expression required Date: Thu, 08 Dec 2005 14:50:37 +0100 Organization: CERN - European Laboratory for Particle Physics Message-ID: NNTP-Posting-Host: abpc10883.cern.ch Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sunnews.cern.ch 1134049837 13489 (None) 137.138.37.241 X-Complaints-To: news@sunnews.cern.ch User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922 Red Hat/1.7.12-1.1.3.2.SL3 X-Accept-Language: en-us, en Xref: g2news1.google.com comp.lang.ada:6767 Date: 2005-12-08T14:50:37+01:00 List-Id: Hi, procedure Hello is type Shape is tagged null record; type Triangle is new Shape with record SideLen : Positive; end record; A : Shape; B : Shape'Class := A; -- (1) C : Triangle := (SideLen => 7); begin A := C; -- (2) B := C; -- (3) end Hello; (2) does not compile, and this is what was expected. (3) does not compile, neither, beucase "dynamically tagged expression required". Interestingly, (1) is fine. Why is (1) allowed? Why is (3) not allowed? Regards, -- Maciej Sobczak : http://www.msobczak.com/ Programming : http://www.msobczak.com/prog/