comp.lang.ada
 help / color / mirror / Atom feed
* ambiguities for class wide types
@ 1997-03-09  0:00 Robert Dewar
  0 siblings, 0 replies; only message in thread
From: Robert Dewar @ 1997-03-09  0:00 UTC (permalink / raw)



ince this bug was discussed a while ago, I thought the following output
from GNAT would be of interest (GNAT as you see agrees that this is
ambiguous. This is version 3.10 of GNAT, which will be available publicly
some time in the future:

     1. package P is
     2.
     3.    type T is tagged limited null record;
     4.
     5.    procedure Op (L : in     T;
     6.                  R : in out T'Class);
     7.
     8.    procedure Op (L : in     T'Class;
     9.                  R : in out T);
    10.
    11. end;


     1. with P;
     2. procedure test_p is
     3.
     4.    procedure Q (L : in     P.T'Class;
     5.                 R : in out P.T'Class) is
     6.    begin
     7.       P.Op (L, R);  -- this should not compile
               |
        >>> ambiguous expression (cannot resolve "Op")
        >>> possible interpretation at p.ads:8
        >>> possible interpretation at p.ads:5

     8.    end;
     9.
    10.    O1, O2 : P.T;
    11.
    12. begin
    13.    Q (P.T'Class (O1), P.T'Class (O2));
    14. end;





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-03-09  0:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-03-09  0:00 ambiguities for class wide types Robert Dewar

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