comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adam@irvine.com>
Subject: Re: Q: how to copy contents and use ancestor's constraints at the same time ?
Date: Tue, 14 Aug 2007 16:35:15 -0700
Date: 2007-08-14T16:35:15-07:00	[thread overview]
Message-ID: <1187134515.868175.142200@q4g2000prc.googlegroups.com> (raw)
In-Reply-To: <RZ6wi.61670$Fc.37230@attbi_s21>

On Aug 13, 5:48 pm, "Jeffrey R. Carter"
<spam.jrcarter....@acm.nospam.org> wrote:
> Adam Beneschan wrote:
>
> >    work_pf : PF := (initial_pf with others => <>);
>
> That's my suggestion, too. It seems legal to me.

I did check the rules, and it seems legal to me, too.  The thing I
can't find in the RM is an explicit statement that for an extension
aggregate, where the ancestor_part is an expression and the derived
type has discriminants inherited from the type of the ancestor_part,
the resulting extension aggregate has a constrained subtype with the
same discriminant values as the ancestor expression.    (The section
on extension aggregates does discuss the case where discriminants
aren't inherited, but there's no explicit mention of the inherited
discriminant case.)  It's probably obvious enough not to need mention;
and in any case, it probably follows from something else in the RM,
but if I tried to dig any further, I'd end up saying something like

> "My brain hurts!"

and then it would have to come out.  (The brain in my head, that is.)

                        -- Adam






  reply	other threads:[~2007-08-14 23:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-13 21:16 Q: how to copy contents and use ancestor's constraints at the same time ? Gautier
2007-08-13 21:33 ` Adam Beneschan
2007-08-14  0:48   ` Jeffrey R. Carter
2007-08-14 23:35     ` Adam Beneschan [this message]
2007-08-14  7:45 ` Dmitry A. Kazakov
2007-08-14  8:59   ` gautier_niouzes
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox