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.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,12d893e9461dcfe6 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.180.106.199 with SMTP id gw7mr1194853wib.0.1344264267334; Mon, 06 Aug 2012 07:44:27 -0700 (PDT) Path: q11ni72664032wiw.1!nntp.google.com!volia.net!news2.volia.net!feed-A.news.volia.net!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!border2.nntp.ams2.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news.panservice.it!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!gegeweb.org!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Tue, 31 Jul 2012 18:50:52 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Access to generic formal parameters in an generic package instantiation References: <87a9yi5t7j.fsf@mid.deneb.enyo.de> <50178db2$0$6562$9b4e6d93@newsspool4.arcor-online.net> <597cbe39-60e5-4ac3-bbb6-71b03c57d5b3@googlegroups.com> In-Reply-To: <597cbe39-60e5-4ac3-bbb6-71b03c57d5b3@googlegroups.com> Message-ID: <50180ce7$0$6574$9b4e6d93@newsspool3.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 31 Jul 2012 18:50:47 CEST NNTP-Posting-Host: e1866d27.newsspool3.arcor-online.net X-Trace: DXC=X204ncKcb;lOKO]LCQ@0g`McF=Q^Z^V3h4Fo<]lROoRa8kFjLh>_cHTX3jm66[[:aPL]al X-Complaints-To: usenet-abuse@arcor.de Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Date: 2012-07-31T18:50:47+02:00 List-Id: On 31.07.12 17:29, Adam Beneschan wrote: >> package Test_1 is new Ops (Int, Int, Int, Two, Two); >> > --!GNAT! package Test_2 is new Ops (Int, Int, Chr, Two, C); > GNAT gets a bug box here, but you do realize that the instantiation is illegal, right? T2 is supposed to be derived from T1, but Chr is not derived from Int. I'm sure you probably realize this, but it's not clear from your post what you're trying to show. Yes, I had hoped that GNAT, like ObjectAda, would say that at compile time, i.e. whether I can instantiate the generic with the two types, or that they are too different, in a sense. I thought that involving a number of things tested at compile time could remotely resemble testing (type related?) things like is done when using C++ templates.