From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, WEIRD_PORT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c417eeec2c625f8a,start X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: ambiguities for class wide types Date: 1997/03/09 Message-ID: #1/1 X-Deja-AN: 224179215 Organization: New York University Newsgroups: comp.lang.ada Date: 1997-03-09T00:00:00+00:00 List-Id: 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;