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,4894bc8fcf637af8 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.germany.com!storethat.news.telefonica.de!telefonica.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Tue, 29 Jan 2008 13:48:13 +0100 From: Georg Bauhaus User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Interfaces and private types References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <479f208d$0$27200$9b4e6d93@newsspool1.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 29 Jan 2008 13:48:13 CET NNTP-Posting-Host: cd6fb858.newsspool1.arcor-online.net X-Trace: DXC=IHVB]CBK3JJE4ZB2flKORAic==]BZ:afN4Fo<]lROoRAFl8W>\BH3YBARBR Philippe Tarroux schrieb: > Randy Brukardt wrote: >> Specifically, it violates 7.3(7.3/2): "the partial view shall be a >> descendant of an interface type (see 3.9.4) if and only if the full >> type is >> a descendant of the interface type." >> As written, this is illegal because type T does not have the >> interface Int. > As it is written the compiler i use doesn't mention any error and i > interpreted this construct as legal because : > > 1/ the interface is synchronized thus allowing to derive concurrent or > non concurrent types > 2/ The partial view is a descendant of the interface type > 3/ The full view precises that the partial view correspond to a > concurrent type but hides this detail to the user I'd rather think that the compiler should diagnose conflicting declaration of T in the private part as the private T does not declare a relation with the public T. If you do not want to derive T publicly, why not package Test_Interfaces is type Int is synchronized interface; procedure Init (I : in out Int) is abstract; type T is limited private; private task type T is new Int with overriding entry Init; end T; end Test_Interfaces;