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,9b7d3a51d0d8b6ee X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!a17g2000prm.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Extending discriminant types Date: Thu, 20 Nov 2008 16:29:00 -0800 (PST) Organization: http://groups.google.com Message-ID: <3f77e490-2f54-4441-828e-6c6e68d245df@a17g2000prm.googlegroups.com> References: <20081115101632.5f98c596@cube.tz.axivion.com> <26f0cb8c-eb3e-4c0d-85d1-f45e2c1ba4c6@j38g2000yqa.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1227227340 30534 127.0.0.1 (21 Nov 2008 00:29:00 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 21 Nov 2008 00:29:00 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: a17g2000prm.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ 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) Xref: g2news2.google.com comp.lang.ada:3690 Date: 2008-11-20T16:29:00-08:00 List-Id: On Nov 20, 2:59 pm, a...@anon.org (anon) wrote: > First, the second specification package that I use was written by > "Pascal Leroy". another editor of the Ada 2005 RM. "Randy Brukardt" > skip this topic. > > QUOTE > Our compiler currently rejects the following code fragment because it > complains that the overriding "=" is not subtype conformant with the > inherited "=" (3.9.2(10)): > > package P is > type T is tagged private; > function "=" (Left, Right : T'Base) return Boolean; > private > type T is tagged null record; > end P; > > T is a constrained subtype as per 3.2(9), so as far as I understand, T is > different from the "T italic" used in 4.5.2(7). > > I hope that there is flaw in my reasoning, because if it is correct, it > looks like we have a pretty severe problem... > > Pascal > UNQUOTE > > And since both RM 95 and RM 2005, do not clarify that the "Base" attribute > is for scalar types only, then you must assume that the "Base' attribute > can apply to other types as well. The Annotated Ada Reference Manual does clarify this, though. See AARM 3.5(63.a). http://www.adaic.org/standards/05aarm/html/AA-3-5.html Else either "Pascal Leroy" or may be > "Randy Brukardt" would have correct the misunderstanding of this > attribute, especially since, Pascal implied the understanding in the > first place by use of his example. Either that, or both Pascal and Randy are human and both erred by missing the problem. It happens. -- Adam