From: Adam Beneschan <adam@irvine.com>
Subject: Re: Access to generic formal parameters in an generic package instantiation
Date: Mon, 30 Jul 2012 11:37:45 -0700 (PDT)
Date: 2012-07-30T11:37:45-07:00 [thread overview]
Message-ID: <e5cdec88-73bd-4433-be30-d3cded17ffa0@googlegroups.com> (raw)
In-Reply-To: <87y5m22r0u.fsf@mid.deneb.enyo.de>
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
next prev parent reply other threads:[~2012-08-07 7:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-29 18:16 Access to generic formal parameters in an generic package instantiation Florian Weimer
2012-07-29 19:36 ` Dmitry A. Kazakov
2012-07-29 21:31 ` Florian Weimer
2012-07-30 18:37 ` Adam Beneschan [this message]
2012-07-30 18:33 ` Adam Beneschan
2012-07-31 7:48 ` Georg Bauhaus
2012-07-31 15:29 ` Adam Beneschan
2012-07-31 16:50 ` Georg Bauhaus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox