comp.lang.ada
 help / color / mirror / Atom feed
* Overloading for T and T'Class
@ 1994-11-11 21:33 John Volan
  1994-11-14  2:07 ` David Weller
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: John Volan @ 1994-11-11 21:33 UTC (permalink / raw)


In Ada9X, is it legal to overload the same subprogram name for both
some tagged type T and its class-wide type T'Class?  For example:

	package P is
	  type T is tagged ... ;
	  procedure Op (X : in out T);
	  procedure Op (X : in out T'Class);
	  ...
	end P;

If this is legal, what would be the ramifications of doing this?
Would it even make any sense to do this?  If it did make sense, does
anyone have any thoughts as to where this might turn out to be useful?

This might seem like a strange question, but it's been nagging me for a 
while, and I'd appreciate whatever insights you folks out there might
have.  Thanks in advance!

					John Volan

--------------------------------------------------------------------------------
--  Me : Person := (Name                => "John Volan",
--                  Company             => "Raytheon Missile Systems Division",
--                  E_Mail_Address      => "jgv@swl.msd.ray.com",
--                  Affiliation         => "Enthusiastic member of Team Ada!",
--                  Humorous_Disclaimer => "These opinions are undefined " &
--                                         "by my employer and therefore " &
--                                         "any use of them would be "     &
--                                         "totally erroneous.");
--------------------------------------------------------------------------------





^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Overloading for T and T'Class
  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
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 13+ messages in thread
From: David Weller @ 1994-11-14  2:07 UTC (permalink / raw)


In article <Cz4H8G.MA@swlvx2.msd.ray.com>,
John Volan <jgv@swl.msd.ray.com> wrote:
>In Ada9X, is it legal to overload the same subprogram name for both
>some tagged type T and its class-wide type T'Class?  For example:
>
>	package P is
>	  type T is tagged ... ;
>	  procedure Op (X : in out T);
>	  procedure Op (X : in out T'Class);
>	  ...
>	end P;
>

My neophyte language-lawerly sense says "No", you can't do this.  The
reason being (I think, don't have my RM with me), is that the
classwide operation declares an implicit operation within the
immediate scope that is identical to your first declaration of Op.

As a compiler, your declarations would confuse me, since the first Op
says "I'm a primitive operation, and thus I may be extended and
modified by descendants", and the second one says, "I'm a classwide
operation, thus any descendant of my type (a member of T'Class) must
execute this subprogram".  A contradiction, from my perspective.

I think GNAT (at the moment) permits this, further confusing the
issue.

Your example was similar to an issue discussed during a presentation
I made on the first version of the Booch COmponents at Tri-Ada.  


-- 
Proud (and vocal) member of Team Ada! (and Team OS/2)        ||This is not your
   	      Ada -- Very Cool.  Doesn't Suck.               ||  father's Ada 
For all sorts of interesting Ada tidbits, run the command:   ||________________
"finger dweller@starbase.neosoft.com | more" (or e-mail with "finger" as subj.)
   ObNitPick: Spelling Ada as ADA is like spelling C++ as CPLUSPLUS. :-) 



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Overloading for T and T'Class
  1994-11-11 21:33 Overloading for T and T'Class John Volan
  1994-11-14  2:07 ` David Weller
@ 1994-11-15  2:22 ` Bob Duff
  1994-11-16 11:33   ` Robert I. Eachus
       [not found] ` <3a6goo$j7s@starbase.neosoft.com>
  1994-11-16  1:22 ` John Volan
  3 siblings, 1 reply; 13+ messages in thread
From: Bob Duff @ 1994-11-15  2:22 UTC (permalink / raw)


In article <Cz4H8G.MA@swlvx2.msd.ray.com>,
John Volan <jgv@swl.msd.ray.com> wrote:
>In Ada9X, is it legal to overload the same subprogram name for both
>some tagged type T and its class-wide type T'Class?  For example:

Yes, but not particularly useful.

>	package P is
>	  type T is tagged ... ;
>	  procedure Op (X : in out T);
>	  procedure Op (X : in out T'Class);
>	  ...
>	end P;

This is legal, but calls to Op will tend to be ambiguous.  For example,
if Y is of type T, then Op(Y) might mean either one of the Ops, and
would therefore be ambiguous (and therefore illegal).

We considered making the above declarations be homographs, and therefore
illegal in the above case, but that caused some subtle semantic problems
(I can't remember the details right now), so we decided to allow it.
It's not necessary to make every useless thing illegal.

Anyway, don't do it.  ;-)

- Bob
-- 
Bob Duff                                bobduff@inmet.com
Oak Tree Software, Inc.
Ada 9X Mapping/Revision Team (Intermetrics, Inc.)



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Overloading for T and T'Class
       [not found] ` <3a6goo$j7s@starbase.neosoft.com>
@ 1994-11-15  2:35   ` Tucker Taft
  1994-11-15 11:39     ` David Weller
  1994-11-15 14:15     ` Norman H. Cohen
  0 siblings, 2 replies; 13+ messages in thread
From: Tucker Taft @ 1994-11-15  2:35 UTC (permalink / raw)


In article <3a6goo$j7s@starbase.neosoft.com>,
David Weller <dweller@Starbase.NeoSoft.COM> wrote:

>In article <Cz4H8G.MA@swlvx2.msd.ray.com>,
>John Volan <jgv@swl.msd.ray.com> wrote:

>>In Ada9X, is it legal to overload the same subprogram name for both
>>some tagged type T and its class-wide type T'Class?  For example:
>>
>>	package P is
>>	  type T is tagged ... ;
>>	  procedure Op (X : in out T);
>>	  procedure Op (X : in out T'Class);
>>	  ...
>>	end P;
>>
>
>My neophyte language-lawerly sense says "No", you can't do this.  ...

Bzzz!  We will repeat the entire question for the other team...

Seriously, though, this is a subtle one.  You can declare the
subprograms, but you will have trouble writing a call on either one that is
not ambiguous.  An earlier version of the 9X proposals made it illegal
to declare two subprograms that were indistinguishable from a call
point of view.  However, this rule added significantly to the complexity
of the conformance rules, without producing commensurate benefits (in
our estimation).

> ...
>I think GNAT (at the moment) permits this, further confusing the
>issue.
>
>Your example was similar to an issue discussed during a presentation
>I made on the first version of the Booch COmponents at Tri-Ada.  

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.  Hence, it is conceivable that the 
above might have some use, presuming no one wanted to use either
one with T or T'Class, but rather with other descendants of T such
as, say, T2 or T2'Class.

-Tucker Taft stt@inmet.com



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Overloading for T and T'Class
  1994-11-14  2:07 ` David Weller
@ 1994-11-15  5:01   ` Cyrille Comar
  0 siblings, 0 replies; 13+ messages in thread
From: Cyrille Comar @ 1994-11-15  5:01 UTC (permalink / raw)


dweller@Starbase.NeoSoft.COM (David Weller) writes:
: In article <Cz4H8G.MA@swlvx2.msd.ray.com>,
: John Volan <jgv@swl.msd.ray.com> wrote:
: >In Ada9X, is it legal to overload the same subprogram name for both
: >some tagged type T and its class-wide type T'Class?  For example:
: >
: >	package P is
: >	  type T is tagged ... ;
: >	  procedure Op (X : in out T);
: >	  procedure Op (X : in out T'Class);
: >	  ...
: >	end P;
: >
: 
: As a compiler, your declarations would confuse me, since the first Op
: says "I'm a primitive operation, and thus I may be extended and
: modified by descendants", and the second one says, "I'm a classwide
: operation, thus any descendant of my type (a member of T'Class) must
: execute this subprogram".  A contradiction, from my perspective.
: 
: I think GNAT (at the moment) permits this, further confusing the
: issue.

My understanding (without checking the RM...) is that the above declarations
are legal but that any USE of "Op" would be ambiguate, so it is really
useless... 
I am not completely sure though...




-- 
------------------------------------------------------------------------
Cyrille Comar,                                  E-mail: comar@cs.nyu.edu
Gnat Project                                    US phone: (212) 998-3489




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Overloading for T and T'Class
  1994-11-15  2:35   ` Tucker Taft
@ 1994-11-15 11:39     ` David Weller
  1994-11-16  4:32       ` Brad Balfour
  1994-11-15 14:15     ` Norman H. Cohen
  1 sibling, 1 reply; 13+ messages in thread
From: David Weller @ 1994-11-15 11:39 UTC (permalink / raw)


In article <CzAF7q.29E@inmet.camb.inmet.com>,
Tucker Taft <stt@dsd.camb.inmet.com> wrote:
>>
>>My neophyte language-lawerly sense says "No", you can't do this.  ...
>
>Bzzz!  We will repeat the entire question for the other team...
>

Ah, the gentle hand of "Dad" strikes again :-)

>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.  Hence, it is conceivable that the 
>above might have some use, presuming no one wanted to use either
>one with T or T'Class, but rather with other descendants of T such
>as, say, T2 or T2'Class.
>

Ah good, then I'm entirely correct for saying the next thing to Brad
Balfour:
	See, Brad, I _told_ ya so!

:-)



-- 
Proud (and vocal) member of Team Ada! (and Team OS/2)        ||This is not your
   	      Ada -- Very Cool.  Doesn't Suck.               ||  father's Ada 
For all sorts of interesting Ada tidbits, run the command:   ||________________
"finger dweller@starbase.neosoft.com | more" (or e-mail with "finger" as subj.)
   ObNitPick: Spelling Ada as ADA is like spelling C++ as CPLUSPLUS. :-) 



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Overloading for T and T'Class
  1994-11-15  2:35   ` Tucker Taft
  1994-11-15 11:39     ` David Weller
@ 1994-11-15 14:15     ` Norman H. Cohen
  1 sibling, 0 replies; 13+ messages in thread
From: Norman H. Cohen @ 1994-11-15 14:15 UTC (permalink / raw)


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



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Overloading for T and T'Class
  1994-11-11 21:33 Overloading for T and T'Class John Volan
                   ` (2 preceding siblings ...)
       [not found] ` <3a6goo$j7s@starbase.neosoft.com>
@ 1994-11-16  1:22 ` John Volan
  1994-11-16 11:59   ` David Weller
  1994-11-19  4:54   ` Cyrille Comar
  3 siblings, 2 replies; 13+ messages in thread
From: John Volan @ 1994-11-16  1:22 UTC (permalink / raw)


In article <Cz4H8G.MA@swlvx2.msd.ray.com> jgv@swl.msd.ray.com (John Volan) writes:

> In Ada9X, is it legal to overload the same subprogram name for both
>some tagged type T and its class-wide type T'Class?  For example:
>
>	package P is
>	  type T is tagged ... ;
>	  procedure Op (X : in out T);
>	  procedure Op (X : in out T'Class);
>	  ...
>	end P;
>
>If this is legal, what would be the ramifications of doing this?
>Would it even make any sense to do this?  If it did make sense, does
>anyone have any thoughts as to where this might turn out to be useful?

Thanks to those who sent me private e-mail on this.  Summarizing the
responses so far: Yes, this does appear to be legal according to the
current definition of Ada9X.  Apparently, T and T'Class are considered
to be different types, even though the set of values of type T'Class
"covers" the set of values of type T.  That's pretty much what I
figured.

However, doing this might cause overload resolution problems when you
make an invocation:

	with P;
	procedure P_Client (X: in out P.T) is
	begin
	  ...
	  P.Op (X); -- Error in overload resolution -- ambiguous.
	  ...
	  P.Op (P.T'(X));  -- Although maybe these would work?
	  P.Op (P.T'Class'(X));
	  ...
	end P_Client;

On the other hand, the following doesn't appear to be ambiguous:

	with P;
	procedure Another_P_Client (X: in out P.T'Class) is
	begin
	  ...
	  P.Op (X); -- No problem, only one way to interpret this
	  ...
	end Another_P_Client;

(FYI: GNAT-1.83 seems to like the package spec P, but dies with an
assertion failure on an attempt to invoke.  (Bug report has been
filed.)  Anyway, it would be nice to get some human confirmation on
this.  Tucker, you have the last word: Is this legal?)

The other half of my question was whether there was any rationale
anyone could suggest for actually making use of this kind of
overloading.  Personally, I haven't been able to come up with one.  On
the basis of the ambiguous-invocation problem alone, I'd say that we'd
probably want to avoid doing overloadings like these.  But does anyone
else have any thoughts on this?

					John Volan

--------------------------------------------------------------------------------
--  Me : Person := (Name                => "John Volan",
--                  Company             => "Raytheon Missile Systems Division",
--                  E_Mail_Address      => "jgv@swl.msd.ray.com",
--                  Affiliation         => "Enthusiastic member of Team Ada!",
--                  Humorous_Disclaimer => "These opinions are undefined " &
--                                         "by my employer and therefore " &
--                                         "any use of them would be "     &
--                                         "totally erroneous.");
--------------------------------------------------------------------------------








^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Overloading for T and T'Class
  1994-11-15 11:39     ` David Weller
@ 1994-11-16  4:32       ` Brad Balfour
  1994-11-16 14:34         ` John Volan
  0 siblings, 1 reply; 13+ messages in thread
From: Brad Balfour @ 1994-11-16  4:32 UTC (permalink / raw)


In article <3aa6mf$t3j@Starbase.NeoSoft.COM>, dweller@Starbase.NeoSoft.COM
(David Weller) wrote:

> In article <CzAF7q.29E@inmet.camb.inmet.com>,
> Tucker Taft <stt@dsd.camb.inmet.com> wrote:
> >The above is legal, though a call would generally be ambiguous.
>
> Ah good, then I'm entirely correct for saying the next thing to Brad
> Balfour:
>         See, Brad, I _told_ ya so!

Well Dave...
  If you'd stuck around for a few minutes longer you'd have witnessed the
site of 5 language lawyers/DRs (including Bob Duff and Gary Dismukes who
produced the right answer) all strugling with this one. We figured that
the amount of money that it cost to answer the one question (at language
lawyer rates) was nearly enough to pay off the national debt :-). The
consensus of the group was the same as Tucker's. They pointed me to
8.6(30) as the paragraph which confirms that while the declarations were
legal, calls to the subprograms could never be resolved.

So yes, you were right that the procedures could be written. However, I
still think I was right for thinking that they couldn't be used.

So I told ya so too :-)

Brad

-- 
Brad Balfour
CACI, Inc.
bbalfour@acm.org
(703) 824-4505
Team Ada member



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Overloading for T and T'Class
  1994-11-15  2:22 ` Bob Duff
@ 1994-11-16 11:33   ` Robert I. Eachus
  0 siblings, 0 replies; 13+ messages in thread
From: Robert I. Eachus @ 1994-11-16 11:33 UTC (permalink / raw)


In article <CzAEL6.1w0@inmet.camb.inmet.com> bobduff@dsd.camb.inmet.com (Bob Duff) writes:

  > >In Ada9X, is it legal to overload the same subprogram name for both
  > >some tagged type T and its class-wide type T'Class?  For example:

  > Yes, but not particularly useful.

    There is one use, and I have actually used a similar Ada 83 trick.
If you want to delete an operation that makes sense for the parent,
you can use such explicit overloading to hide the operation forever.

    The near equivalent Ada 83 trick is to have two declarations, one
of which has an additional parameter with a default.  The only way to
access the version with fewer parameters is by renaming it.  This can
be used to replace an inherited operation with one that conveys
additional necessary information.  (And of course any call which uses
the default is ambiguous, so the interface is a little misleading.
But you can add a comment to the declaration.)
--

					Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Overloading for T and T'Class
  1994-11-16  1:22 ` John Volan
@ 1994-11-16 11:59   ` David Weller
  1994-11-19  4:54   ` Cyrille Comar
  1 sibling, 0 replies; 13+ messages in thread
From: David Weller @ 1994-11-16 11:59 UTC (permalink / raw)


In article <CzC6Ho.Lqn@swlvx2.msd.ray.com>,
John Volan <jgv@swl.msd.ray.com> wrote:
>Thanks to those who sent me private e-mail on this.  Summarizing the
>responses so far: Yes, this does appear to be legal according to the
>current definition of Ada9X.  Apparently, T and T'Class are considered
>to be different types, even though the set of values of type T'Class
>"covers" the set of values of type T.  That's pretty much what I
>figured.
>
>The other half of my question was whether there was any rationale
>anyone could suggest for actually making use of this kind of
>overloading.  Personally, I haven't been able to come up with one.  On
>the basis of the ambiguous-invocation problem alone, I'd say that we'd
>probably want to avoid doing overloadings like these.  But does anyone
>else have any thoughts on this?
>

(Dave rubs hands gleefully)

Why, yes, John, there _is_ a use.  The Booch Components has the
ability to permit assignment and equality checks across each
hierarchy.  THat way, I can see if an Unbounded_Queue is structurally
equivalent to a Bounded_Queue.  Sooooo....  I create a top level type
declaration that is abstract:
	type Queue is abstract tagged private;
then an "=" operator:
	function "="(L, R : Queue'Class) return Boolean;
(There is an implicit declaration of:
	function "="(L, R : Queue) return Boolean;
when that classwide operation is declared)

Now, the point is that I can _never_ call the operation "=" for type
Queue (except perhaps inside the body of the package where Queue is
declared, and I can handle that).  

OK, that doesn't _quite_ answer your question, but it does suggest a
potential area for application.

I'd give a longer dissertation on this, but I'm still finishing up
slides for a presentation on the Booch Components for tonight.

-- 
Proud (and vocal) member of Team Ada! (and Team OS/2)        ||This is not your
   	      Ada -- Very Cool.  Doesn't Suck.               ||  father's Ada 
For all sorts of interesting Ada tidbits, run the command:   ||________________
"finger dweller@starbase.neosoft.com | more" (or e-mail with "finger" as subj.)
      Just another dull, stodgy, non-creative developer who uses Ada.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Overloading for T and T'Class
  1994-11-16  4:32       ` Brad Balfour
@ 1994-11-16 14:34         ` John Volan
  0 siblings, 0 replies; 13+ messages in thread
From: John Volan @ 1994-11-16 14:34 UTC (permalink / raw)


bbalfour@acm.org (Brad Balfour) writes:

>In article <3aa6mf$t3j@Starbase.NeoSoft.COM>, dweller@Starbase.NeoSoft.COM
>(David Weller) wrote:

>> In article <CzAF7q.29E@inmet.camb.inmet.com>,
>> Tucker Taft <stt@dsd.camb.inmet.com> wrote:
>> >The above is legal, though a call would generally be ambiguous.

Hmm ... I seem to have missed this whole exchange.  Looks like my
newsfeed must have gone down over the weekend.  Apologies to Tucker
for prodding him for an answer in my second post.

>>
>> Ah good, then I'm entirely correct for saying the next thing to Brad
>> Balfour:
>>         See, Brad, I _told_ ya so!

>Well Dave...
>  If you'd stuck around for a few minutes longer you'd have witnessed the
>site of 5 language lawyers/DRs (including Bob Duff and Gary Dismukes who
>produced the right answer) all strugling with this one. We figured that
>the amount of money that it cost to answer the one question (at language
>lawyer rates) was nearly enough to pay off the national debt :-). 

Gee, maybe I should've kept my big mouth shut in the first place ... NOT!  ;-)

					John Volan

--------------------------------------------------------------------------------
--  Me : Person := (Name                => "John Volan",
--                  Company             => "Raytheon Missile Systems Division",
--                  E_Mail_Address      => "jgv@swl.msd.ray.com",
--                  Affiliation         => "Enthusiastic member of Team Ada!",
--                  Humorous_Disclaimer => "These opinions are undefined " &
--                                         "by my employer and therefore " &
--                                         "any use of them would be "     &
--                                         "totally erroneous.");
--------------------------------------------------------------------------------



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Overloading for T and T'Class
  1994-11-16  1:22 ` John Volan
  1994-11-16 11:59   ` David Weller
@ 1994-11-19  4:54   ` Cyrille Comar
  1 sibling, 0 replies; 13+ messages in thread
From: Cyrille Comar @ 1994-11-19  4:54 UTC (permalink / raw)


jgv@swl.msd.ray.com (John Volan) writes:

: However, doing this might cause overload resolution problems when you
: make an invocation:
: 
: 	with P;
: 	procedure P_Client (X: in out P.T) is
: 	begin
: 	  ...
: 	  P.Op (X); -- Error in overload resolution -- ambiguous.
: 	  ...
: 	  P.Op (P.T'(X));  -- Although maybe these would work?
: 	  P.Op (P.T'Class'(X));
: 	  ...
: 	end P_Client;
: 
: On the other hand, the following doesn't appear to be ambiguous:
: 
: 	with P;
: 	procedure Another_P_Client (X: in out P.T'Class) is
: 	begin
: 	  ...
: 	  P.Op (X); -- No problem, only one way to interpret this
: 	  ...
: 	end Another_P_Client;
: 
: (FYI: GNAT-1.83 seems to like the package spec P, but dies with an
: assertion failure on an attempt to invoke.  (Bug report has been
: filed.)  Anyway, it would be nice to get some human confirmation on
: this.  Tucker, you have the last word: Is this legal?)

Jon, 
your analysis is not quite correct, all the calls in your example are ambiguous
even the last one: it can be interpreted either as a dispatching call to the
primitive Op or a simple call to the classwide Op.  The latest version of gnat
(to be released shortly :-) does a better job than 1.83 and give the right
diagnostics:

gcc -c -gnatl ess.adb

NYU GNAT Compiler Version 2.0 (C) Copyright NYU, 1992,1993,1994

Compiling: ess.adb  94-11-19 04:45.08

     1. procedure ess is
     2.    package P is
     3.       type T is tagged null record;
     4.       procedure Op (X : in out T);
     5.       procedure Op (X : in out T'Class);
     6.    end P;
     7. 
     8.    package body P is
     9.       procedure Op (X : in out T) is begin null; end;
    10.       procedure Op (X : in out T'Class) is begin null; end;
    11.    end P;
    12. 
    13.    procedure P_Client (X: in out P.T) is
    14.    begin
    15.       P.Op (X); -- Error in overload resolution -- ambiguous.
               |
        >>> ambiguous expression (cannot resolve "Op")
        >>> possible interpretation at line 5
        >>> possible interpretation at line 4

    16.       P.Op (P.T'(X));  -- Although maybe these would work?
               |
        >>> ambiguous expression (cannot resolve "Op")
        >>> possible interpretation at line 5
        >>> possible interpretation at line 4

    17.       P.Op (P.T'Class'(X));
               |
        >>> ambiguous expression (cannot resolve "Op")
        >>> possible interpretation at line 5
        >>> possible interpretation at line 4

    18.    end P_Client;
    19. 
    20.    procedure Another_P_Client (X: in out P.T'Class) is
    21.    begin
    22.       P.Op (X);
               |
        >>> ambiguous expression (cannot resolve "Op")
        >>> possible interpretation at line 5
        >>> possible interpretation at line 4

    23.    end Another_P_Client;
    24. 
    25. begin
    26.    null;
    27. end;
-- 
------------------------------------------------------------------------
Cyrille Comar,                                  E-mail: comar@cs.nyu.edu
Gnat Project                                    US phone: (212) 998-3489




^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~1994-11-19  4:54 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
1994-11-16  1:22 ` John Volan
1994-11-16 11:59   ` David Weller
1994-11-19  4:54   ` Cyrille Comar

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