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 2002:a37:4a8f:: with SMTP id x137mr6674563qka.184.1590067430137; Thu, 21 May 2020 06:23:50 -0700 (PDT) X-Received: by 2002:aca:eb56:: with SMTP id j83mr6880619oih.110.1590067429818; Thu, 21 May 2020 06:23:49 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 21 May 2020 06:23:49 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=199.212.255.56; posting-account=ENgozAkAAACH-stq5yXctoDQeZQP2E6J NNTP-Posting-Host: 199.212.255.56 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <3e90280f-ea64-4f85-a1fa-5d2fc75e0ddf@googlegroups.com> Subject: Q: How to inherit methods from parent tagged object? From: Warren Injection-Date: Thu, 21 May 2020 13:23:50 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:58753 Date: 2020-05-21T06:23:49-07:00 List-Id: I've become rusty and am refreshing myself with Ada again using a pet project.. I have a tagged class that I want to inherit all but one of the methods for: type Flash is new Emulator.Memory.Flash with private; procedure Initialize(Obj: in out Flash); -- function Fetch(Obj: in out Flash; Address: Address_Type) return Word_Type; -- function First_Address(Obj: in Flash) return Address_Type; -- function Last_Address(Obj: in Flash) return Address_Type; The only thing I want to override in the new object is the Initialize procedure for the new object. There must be a way to specify that but I can't seem to goggle it on the interwebs. Every example I can find completely redefines all of the methods. I'd like to avoid re-specifying the bodies of Fetch, First_Address and Last_Address for the new object, if that is permitted. If memory serves, there is a way... but the worms have invaded my brain.