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: 103376,2bbd7f65ab12f156 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!q4g2000prc.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada 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 Organization: http://groups.google.com Message-ID: <1187134515.868175.142200@q4g2000prc.googlegroups.com> References: <46c0c9e8$1_3@news.bluewin.ch> <1187040822.123740.52460@x35g2000prf.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: posting.google.com 1187134517 7978 127.0.0.1 (14 Aug 2007 23:35:17 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 14 Aug 2007 23:35:17 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: q4g2000prc.googlegroups.com; posting-host=66.126.103.122; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Xref: g2news2.google.com comp.lang.ada:1442 Date: 2007-08-14T16:35:15-07:00 List-Id: On Aug 13, 5:48 pm, "Jeffrey R. Carter" 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