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.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FROM_STARTS_WITH_NUMS autolearn=no autolearn_force=no version=3.4.4 X-Received: by 2002:a24:2cc8:: with SMTP id i191-v6mr275558iti.35.1522668309727; Mon, 02 Apr 2018 04:25:09 -0700 (PDT) X-Received: by 2002:a9d:e5b:: with SMTP id n27-v6mr524701otd.2.1522668309503; Mon, 02 Apr 2018 04:25:09 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.unit0.net!peer02.am4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!k65-v6no2138041ita.0!news-out.google.com!u64-v6ni5070itb.0!nntp.google.com!k65-v6no2138039ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 2 Apr 2018 04:25:09 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=85.245.160.83; posting-account=rhqvKAoAAABpikMmPHJSZh4400BboHwT NNTP-Posting-Host: 85.245.160.83 References: <29943b13-00d1-443a-82f2-f55272770109@googlegroups.com> <12766e64-7641-45a0-8e76-8330a3b3c101@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: limited agregate and limited components default initialization From: Jean-Claude Rostaing <00120260a@gmail.com> Injection-Date: Mon, 02 Apr 2018 11:25:09 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 2369 X-Received-Body-CRC: 1622441507 Xref: reader02.eternal-september.org comp.lang.ada:51293 Date: 2018-04-02T04:25:09-07:00 List-Id: It works, so much for "impossible" dmitry. I probably read before the implementation you mentioned, I don't remember exactly. I saw something strange writing this. Shouldn't the expression function function GET (Pointer : Pointer_Type) return Accessor_Type is (if Pointer.Pointer = null or else POINTER.Pointer.Value = null then raise EXC_NULL_POINTER_ACCESS else ACCESSOR_TYPE'(Data_Link => Pointer.Pointer.Value)); be strictly equivalent to function GET (Pointer : Pointer_Type) return Accessor_Type is begin if Pointer.Pointer = null or else POINTER.Pointer.Value = null then raise EXC_NULL_POINTER_ACCESS; else return ACCESSOR_TYPE'(Data_Link => Pointer.Pointer.Value); end if; end GET; ? Yet no, the second is fine, the second raises at run time raised CONSTRAINT_ERROR : pointers.adb:20 discriminant check failed