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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,437103ff8a92c0df X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!proxad.net!proxad.net!newsfeed.arcor.de!news.arcor.de!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: generics and records Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.14.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1109532840.857126.234720@z14g2000cwz.googlegroups.com> <8065486.gdOUxkNXWZ@linux1.krischik.com> <4224c698$0$24941$9b4e6d93@newsread2.arcor-online.net> Date: Tue, 1 Mar 2005 21:17:28 +0100 Message-ID: <5kzckz5ti4d5$.ebgeski556b7.dlg@40tude.net> NNTP-Posting-Date: 01 Mar 2005 21:17:25 MET NNTP-Posting-Host: a7c37556.newsread2.arcor-online.net X-Trace: DXC=3 On Tue, 01 Mar 2005 20:47:24 +0100, Georg Bauhaus wrote: > Martin Krischik wrote: > >>>generic >>> type x is private; >> >> You need a common ancestor class for this construct to work: >> >> type x is new y with private; >> >> >>>package ... >>>private >>> type xx is new x; >>>end ... > > Yes and no. Rather no than yes. The following is illegal: generic type X is new Baz with private; package Foo is type XX is new X; end Foo; For whatever sad reasons but type cloning using "type X is new Y;" is not allowed for publicly tagged types. Personally I would prefer subtype X is Y with Z; to present type X is new Y with Z; and treat the latter rather as: type X is new Y with Z; = subtype is Y with Z; type X is new ; -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de