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,90108ed846e3f1bf X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!d19g2000yqb.googlegroups.com!not-for-mail From: christoph.grein@eurocopter.com Newsgroups: comp.lang.ada Subject: Re: Why constructing functions is a mess [was Language lawyer question: task activation Date: Tue, 3 Mar 2009 01:27:17 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <1gxn72yzshp07$.6ytqydmmz37u.dlg@40tude.net> <49a92c29$0$32670$9b4e6d93@newsspool2.arcor-online.net> <1wzjy9pzbft1m.1lut7nszfkzmp$.dlg@40tude.net> <49a95a12$0$31347$9b4e6d93@newsspool4.arcor-online.net> <49a97231$0$30236$9b4e6d93@newsspool1.arcor-online.net> <1mjbcbequf1wz.1o3nwuz7oqteo.dlg@40tude.net> <49a984f6$0$30226$9b4e6d93@newsspool1.arcor-online.net> <49ac0595$0$31344$9b4e6d93@newsspool4.arcor-online.net> <1p6sf3ykej2ls.10jmdonrmif5h.dlg@40tude.net> <49ac2a8e$0$30232$9b4e6d93@newsspool1.arcor-online.net> <7uqw8skbd6y0.ijm97ivq4kei.dlg@40tude.net> <7e0cb26f-3648-44ca-9241-9d0b7269e905@o11g2000yql.googlegroups.com> NNTP-Posting-Host: 80.156.44.178 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1236072437 20093 127.0.0.1 (3 Mar 2009 09:27:17 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 3 Mar 2009 09:27:17 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: d19g2000yqb.googlegroups.com; posting-host=80.156.44.178; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729),gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 webwasher (Webwasher 6.8.3.4214) Xref: g2news1.google.com comp.lang.ada:3885 Date: 2009-03-03T01:27:17-08:00 List-Id: On Mar 3, 9:45=A0am, "Dmitry A. Kazakov" wrote: > >>> =A0 =A0package P1 is > >>> =A0 =A0 =A0 type T1(<>) is abstract tagged limited private; > >>> =A0 =A0private > >>> =A0 =A0 =A0 type T1(X: Character) is tagged limited null record; > >>> =A0 =A0end P1; > > >>> =A0 =A0package P2 is > >>> =A0 =A0 =A0 type T2 is new P1.T1 with private; > >>> =A0 =A0private > >>> =A0 =A0 =A0 type T2 is new P1.T1 with null record; > >>> =A0 =A0 =A0 X: T2 :=3D (P1.T1 with null record); =A0-- Bang! > >>> =A0 =A0end P2; > >>> ... > > >> However it looks like a bug to me, because T1 is unconstrained. > >> Nevertheless, GNAT Pro 6.2.1 successfully compiles it. > > > No, it doesn't (I *have* GNAT Pro 6.2.1). > > > =A0 =A0X: T2 :=3D (P1.T1 with null record); > > =A0 =A0 =A0 =A0 =A0 =A0 | no value supplied for discriminant "X" > > gnatmake: "p2.ads" compilation error > > Hmm, mine is GNAT Pro 6.2.1 (20090115). Different wavefronts or, maybe, > platforms? GNAT Pro 6.2.1 (20090115-43) i686-pc-linux-gnu