comp.lang.ada
 help / color / mirror / Atom feed
From: Martin Krischik <krischik@users.sourceforge.net>
Subject: Re: Is this legal? (Language lawyer question)
Date: Mon, 18 Aug 2003 18:37:20 +0200
Date: 2003-08-18T18:37:20+02:00	[thread overview]
Message-ID: <1518883.yLCxvbNBJf@linux1.krischik.com> (raw)
In-Reply-To: b4682ab7.0308151936.5d4f4c73@posting.google.com

Adam Beneschan wrote:

> I can't see how this wouldn't be ambiguous.  Although ZZZ.all and Elem
> both have type Item'Class, it appears to me that there are two "="
> functions visible at that point:
> 
>    function "=" (L, R : Item) return Boolean;
>    function "=" (L, R : Item'Class) return Boolean;
> 
> where the first one is the predefined operator of the generic formal
> type Item (see RM95 12.5(8)), and the second one is the generic formal
> function declared above.  Applying 8.6(22-23), the expected type for
> the parameters in the first function is Item, and that means that it's
> acceptable for the actual parameter to resolve either to Item or
> Item'Class.  The consequence is that both of the above functions are
> acceptable interpretations for the construct, and thus the construct
> should be ambiguous.

Intersting. Well it does compile and the programs based on it are running
fine. Still if I had made a fundamental mistake here I would like to know
about it.

With regards

Martin.

-- 
mailto://krischik@users.sourceforge.net
http://www.ada.krischik.com




  reply	other threads:[~2003-08-18 16:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-16  3:36 Is this legal? (Language lawyer question) Adam Beneschan
2003-08-18 16:37 ` Martin Krischik [this message]
2003-08-20 20:50   ` Robert I. Eachus
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox