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: a07f3367d7,12d893e9461dcfe6 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.227.67 with SMTP id ry3mr1616290pbc.8.1344323768422; Tue, 07 Aug 2012 00:16:08 -0700 (PDT) Path: p10ni3067140pbh.1!nntp.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!ctu-peer!ctu-gate!news.nctu.edu.tw!usenet.stanford.edu!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Access to generic formal parameters in an generic package instantiation Date: Mon, 30 Jul 2012 11:37:45 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <87a9yi5t7j.fsf@mid.deneb.enyo.de> <1g8gnsgtfkmog$.1gs7zsxkjcxrl.dlg@40tude.net> <87y5m22r0u.fsf@mid.deneb.enyo.de> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 X-Trace: posting.google.com 1343674456 8689 127.0.0.1 (30 Jul 2012 18:54:16 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 30 Jul 2012 18:54:16 +0000 (UTC) In-Reply-To: <87y5m22r0u.fsf@mid.deneb.enyo.de> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Date: 2012-07-30T11:37:45-07:00 List-Id: On Sunday, July 29, 2012 2:31:29 PM UTC-7, Florian Weimer wrote: > > 1. You can to make that type a formal parameter and specify it among the > > formal parameters of the instances: > > > type T is ... > > with package P1 (T, <>); > > with package P2 (T, <>); > > I got a bug box when I tried this. The syntax isn't legal. You shouldn't have gotten a bug box, but you should definitely get an error message. Unless <> is all by itself inside parentheses, you need either a parameter name or "others": generic type T is private; with package P1 (T, others => <>); with package P2 (T, others => <>); or, if (say) P1 has only two formal parameters: with package P1 (T, parameter_name => <>); -- Adam