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: a07f3367d7,f428ff2031155951 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!u24g2000prn.googlegroups.com!not-for-mail From: AdaMagica Newsgroups: comp.lang.ada Subject: Re: Equivalent of dynamic_cast (downcast) for tagged types Date: Fri, 28 Jan 2011 05:11:16 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <375fb596-ab12-4cb0-a190-53d62b94b2e4@e9g2000vbi.googlegroups.com> <510d779c-d15b-4fc1-b831-bfc578ecdb4b@z3g2000prz.googlegroups.com> <7q5flc9of9ey.19h9nmmzjxqn0.dlg@40tude.net> NNTP-Posting-Host: 91.13.227.25 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1296220277 20669 127.0.0.1 (28 Jan 2011 13:11:17 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 28 Jan 2011 13:11:17 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: u24g2000prn.googlegroups.com; posting-host=91.13.227.25; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 ( .NET CLR 3.5.30729; .NET4.0C),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:16768 Date: 2011-01-28T05:11:16-08:00 List-Id: On 28 Jan., 10:16, "Dmitry A. Kazakov" wrote: > On Thu, 27 Jan 2011 14:35:28 -0800 (PST), Maciej Sobczak wrote: > > I have submitted this bug report more than one year ago. Looks like > > nobody even bothered to check it. > > Well, I am not a language lawyer to tell if the behavior (public overriding > of a private primitive operation) is legal. > > > The bug submission states that Adjust is wrongly recognized as > > overriding, which it shouldn't be - but now I have hit something more > > interesting. > > It must be overriding because Adjust is a primitive operation. Whether the > compiler should allow it to become publicly declared as an overriding is > another question. The public specification of Ada.Finalization.Limited_Controlled has no Adjust operation, so there is no primitive operation with that name which you can override, full stop. It's irrelevant if there is some internal one deeply burrowed in the compiler's implementation.