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,532862505ad62ff5,start X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!z28g2000prd.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Does 3.9.3(10) apply to untagged private whose full view is tagged? Date: Wed, 25 Jul 2007 15:04:58 -0700 Organization: http://groups.google.com Message-ID: <1185401098.912519.245650@z28g2000prd.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1185401101 11980 127.0.0.1 (25 Jul 2007 22:05:01 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 25 Jul 2007 22:05:01 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: z28g2000prd.googlegroups.com; posting-host=66.126.103.122; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Xref: g2news2.google.com comp.lang.ada:1188 Date: 2007-07-25T15:04:58-07:00 List-Id: I think the following is legal, but the version of GNAT I'm using rejects it, citing 3.9.3(10): package Pak1 is type T1 is private; private type T1 is tagged record F1 : Integer; end record; function Func (X : Integer) return T2; end Pak1; 3.9.3(10) says, in part, "For a tagged type declared in a visible part, a primitive function with a controlling result shall not be declared in the private part, unless it is overriding a function implicitly declared in the visible part." My interpretation, though, is that it doesn't apply here, and that it only applies to types that are *visibly* tagged in the visible part---not to untagged private types whose full view is tagged. The AARM reasoning for the rule has to do with other packages that declare type extensions of the type that wouldn't know that there's a private function that needs to be overridden---but in this case, other packages (except for private children, which have access to the entire private part of Pak1) can't declare a type extension of T1; so it would make sense that the rule wouldn't apply to this code. Anyway, that's my interpretation, but it seems within the realm of possibility to interpret it the other way. So who's right? Me or GNAT? -- Adam