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.107.88.11 with SMTP id m11mr1162240iob.18.1513645718147; Mon, 18 Dec 2017 17:08:38 -0800 (PST) X-Received: by 10.157.88.6 with SMTP id r6mr58855oth.9.1513645718038; Mon, 18 Dec 2017 17:08:38 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.kjsl.com!usenet.stanford.edu!g80no111018itg.0!news-out.google.com!b73ni324ita.0!nntp.google.com!g80no111013itg.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 18 Dec 2017 17:08:37 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=173.71.208.22; posting-account=QF6XPQoAAABce2NyPxxDAaKdAkN6RgAf NNTP-Posting-Host: 173.71.208.22 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Full view of a private partial view cannot be a subtype From: Jere Injection-Date: Tue, 19 Dec 2017 01:08:38 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:49530 Date: 2017-12-18T17:08:37-08:00 List-Id: On Monday, December 18, 2017 at 3:45:31 PM UTC-5, Stephen Leake wrote: > On Saturday, December 2, 2017 at 8:14:50 PM UTC-6, Jere wrote: > > There are times where in another package I want to > > subtype Base.Instance and do renames of the operations in order > > to bring them all into scope (or whatever the correct term is): > > > > package New_Type1 is > > subtype Instance is Base.Instance; > > procedure Operation(Object : in out Instance); > > > > private > > > > procedure Operation(Object : in out Instance) renames Base.Operation; > > end New_Type1; > > Why subtype? why not a derived type? why do you need a new name with the same operations? It's not a new name...it's actually the same name in a different package. I am basically trying to mimic a much more complex package with a simpler one. They would have the same typenames and operations. I didn't really want to create a new type, just provide a simpler interface to an existing one while hiding one particularly dangerous detail if I could.