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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.99.45.198 with SMTP id t189mr21361527pgt.144.1495753061424; Thu, 25 May 2017 15:57:41 -0700 (PDT) X-Received: by 10.157.46.178 with SMTP id w47mr396906ota.12.1495753061378; Thu, 25 May 2017 15:57:41 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!67no512044itx.0!news-out.google.com!m134ni2195itb.0!nntp.google.com!67no511781itx.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 25 May 2017 15:57:41 -0700 (PDT) In-Reply-To: <62e326e6-dd15-4546-83dc-b1e423327c23@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=173.71.201.205; posting-account=QF6XPQoAAABce2NyPxxDAaKdAkN6RgAf NNTP-Posting-Host: 173.71.201.205 References: <4a47e4cd-829c-4451-abf1-82cf60b67706@googlegroups.com> <9cdf04e6-123e-4bd9-b466-77aad00d61bb@googlegroups.com> <62e326e6-dd15-4546-83dc-b1e423327c23@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Preventing private procedure visibility being made public through extension From: Jere Injection-Date: Thu, 25 May 2017 22:57:41 +0000 Content-Type: text/plain; charset="UTF-8" Xref: news.eternal-september.org comp.lang.ada:46867 Date: 2017-05-25T15:57:41-07:00 List-Id: On Thursday, May 25, 2017 at 6:53:10 PM UTC-4, Jere wrote: > On Thursday, May 25, 2017 at 3:40:01 PM UTC-4, Randy Brukardt wrote: > > Your probably having trouble with the appropriaate view of My_Type. The full > > type of My_Type has both versions of Create (of course), as it inherits from > > View_Type. If you try to extend somewhere where that full view is visible, > > then that extension too will get both Creates. (That includes in the body > > and in any child packages.) > > > > OTOH, an extension somewhere that only has visibility on the private type, > > you should only get one (visible) Create. (But the other one is still > > inherited, it just can't be called directly.) > > > > I could go into more detail if you need that; it would help to have a full > > compilable example in that case so I can see where everything is declared. > > > > Randy. > > > > > > This might be a better example. I have 3 tiers: Base/Derived/More_Derived > > More_Derived publicly inherits off of Base but privately inherits off of > Derived. > > Derived provides a Something procedure and More_Derived provides a Something > procedure but uses a different signature and is not overriding (I double > checked by putting "overriding" with it and noted the compiler error). > > More_Derived does not have private view of Derived, but GNAT still says > there is a ambiguity. I don't see how More_Derived has a private > view of Derived, so I think this is a bug, but I might be missing > something. > > [snipped] > > If I don't use the subtype in main.adb, it compiles fine. Forgot to mention it is GNAT GPL 2016. I don't have FSF working on my Win10 machine yet to check.