comp.lang.ada
 help / color / mirror / Atom feed
From: ncohen@watson.ibm.com (Norman H. Cohen)
Subject: Re: Overloading for T and T'Class
Date: 15 Nov 1994 14:15:27 GMT
Date: 1994-11-15T14:15:27+00:00	[thread overview]
Message-ID: <3aafpv$qn9@watnews1.watson.ibm.com> (raw)
In-Reply-To: CzAF7q.29E@inmet.camb.inmet.com

In article <CzAF7q.29E@inmet.camb.inmet.com>, stt@dsd.camb.inmet.com
(Tucker Taft) writes: 

|> The above is legal, though a call would generally be ambiguous.
|> Actually, the class-wide operation can be called, provided the actual
|> parameter is of some descendant of T other than T or T'Class itself.
|> Furthermore, the primitive operation once inherited by some
|> descendant (say T2) would be callable, presuming T2 is declared
|> in some other package.

Also, if the formal parameters of the two subprograms were given
different names, a named parameter association could be used to
disambiguate calls with parameters of type T or T'Class.

(This is just a language-lawyerly observation, not recommended practice.
Kids, don't try this at home.)

--
Norman H. Cohen    ncohen@watson.ibm.com



  parent reply	other threads:[~1994-11-15 14:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-11-11 21:33 Overloading for T and T'Class John Volan
1994-11-14  2:07 ` David Weller
1994-11-15  5:01   ` Cyrille Comar
1994-11-15  2:22 ` Bob Duff
1994-11-16 11:33   ` Robert I. Eachus
     [not found] ` <3a6goo$j7s@starbase.neosoft.com>
1994-11-15  2:35   ` Tucker Taft
1994-11-15 11:39     ` David Weller
1994-11-16  4:32       ` Brad Balfour
1994-11-16 14:34         ` John Volan
1994-11-15 14:15     ` Norman H. Cohen [this message]
1994-11-16  1:22 ` John Volan
1994-11-16 11:59   ` David Weller
1994-11-19  4:54   ` Cyrille Comar
replies disabled

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