comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: ambiguities for class wide types
Date: 1997/03/09
Date: 1997-03-09T00:00:00+00:00	[thread overview]
Message-ID: <dewar.857918005@merv> (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;





                 reply	other threads:[~1997-03-09  0:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
replies disabled

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