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,b688eb046592f849 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.238.198 with SMTP id vm6mr14425420pbc.3.1328629962993; Tue, 07 Feb 2012 07:52:42 -0800 (PST) Path: lh20ni270958pbb.0!nntp.google.com!news1.google.com!postnews.google.com!m5g2000yqk.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: GNAT GPL 2011 bug ? Date: Tue, 7 Feb 2012 07:50:41 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <4b574ffc-15f2-4c74-878c-1e9884849d1b@eb6g2000vbb.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 X-Trace: posting.google.com 1328629962 12777 127.0.0.1 (7 Feb 2012 15:52:42 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 7 Feb 2012 15:52:42 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: m5g2000yqk.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: ARLUEHNKC X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET4.0C),gzip(gfe) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-02-07T07:50:41-08:00 List-Id: On Feb 7, 4:05=A0am, David wrote: > Hi all, > > The compiler accept the line mark by a arrow of the adb bellow and > refuse the line mark by "****". I think it must not accept the first > line to. What do you think ? I agree, it's a bug. It shouldn't allow a constant L_I to be passed as an OUT parameter. -- Adam > > Thanks > > ------- =A0ads =A0-------- > > =A0 type I is interface; > > =A0 =A0procedure set (Self =A0: =A0 =A0out I; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Value : in =A0 =A0 Natural= ) is abstract; > > =A0 =A0type A is abstract tagged null record; > > =A0 =A0procedure set (Self =A0: =A0 =A0out A; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Value : in =A0 =A0 Natural= ) is abstract; > > =A0 =A0type Implement_I is new I with null record; > > =A0 =A0overriding procedure set (Self =A0: =A0 =A0out Implement_I; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 Value : in =A0 =A0 Natural) is > null; > > =A0 =A0Null_Implement_I : constant Implement_I :=3D Implement_I'(null > record); > > =A0 =A0type Implement_A is new A with null record; > > =A0 =A0overriding procedure set (Self =A0: =A0 =A0out Implement_A; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0Value : in =A0 =A0 Natural) is null; > > =A0 =A0Null_Implement_A : constant Implement_A :=3D Implement_A'(null > record); > > =A0 =A0procedure Test; > > --- =A0 adb =A0 --- > > procedure Test > is > =A0 =A0L_I =A0 : constant test.I'Class =A0 =A0:=3D Null_Implement_I; > =A0 =A0L_A : constant test.A'Class =A0 :=3D Null_Implement_A; > begin > =A0 =A0L_I.set (Value =3D> 2); <-------- > =A0 =A0L_A.set (Value =3D> 2); ******* > end;