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.9 required=5.0 tests=BAYES_00,XPRIO autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1038b3dc09d106c2,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-09-03 08:16:55 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.stealth.net!newsfeed.nyc.globix.net!newsfeed.sjc.globix.net!cyclone-sf.pbi.net!206.13.28.144!news.pacbell.net.POSTED!not-for-mail From: "Ed Colbert" Newsgroups: comp.lang.ada Subject: Dispatching Example Organization: Absolute Software Co., Inc. X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: Date: Mon, 3 Sep 2001 08:16:53 -0700 NNTP-Posting-Host: 63.193.36.170 X-Complaints-To: abuse@pacbell.net X-Trace: news.pacbell.net 999530214 63.193.36.170 (Mon, 03 Sep 2001 08:16:54 PDT) NNTP-Posting-Date: Mon, 03 Sep 2001 08:16:54 PDT Xref: archiver1.google.com comp.lang.ada:12656 Date: 2001-09-03T08:16:53-07:00 List-Id: Hi All, Below is a simplified example from Richard Riehle's & my course on Ada. GNAT v3.13p says that the call Is_Item is an mbiguous expression, and ObjectAda v 7.2 says the statement is illegal based on LRM 5.2(6). Both Richard and I thought that the expression is tag indeterminate, LRM 3.9.2(6), and would static resolved, LRM 3.9.2(19). Are Richard and I missing something or are both compilers wrong? package Dispatching_Examples is type T1 is tagged private; function Is_Item return T1; type T2 is new T1 with private; function Is_Item return T2; private -- full definition of T1 and T2 type T1 is tagged null record; type T2 is new T1 with null record; end Dispatching_Examples; with Dispatching_Examples; use Dispatching_Examples; procedure Dispatching_Examples_Driver is A, B : T1; -- simple variables Q, R : T2; -- simple variables C : T1'Class := A; -- class-wide variable D : T2'Class := R ; -- class-wide variable begin C := Is_Item ; -- static resolution? end Dispatching_Examples_Driver;