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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1038b3dc09d106c2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-09-04 03:55:46 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!195.54.122.107!newsfeed1.bredband.com!bredband!newsfeed1.telenordia.se!news.algonet.se!algonet!newsfeed1.uni2.dk!news.net.uni-c.dk!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: Dispatching Example Date: Tue, 04 Sep 2001 12:55:44 +0200 Organization: Centre for Chaos and Turbulence Studies, Niels Bohr Institute Message-ID: <3B94B330.15C04CE@nbi.dk> References: NNTP-Posting-Host: alf.nbi.dk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.net.uni-c.dk 999600945 40470 130.225.212.55 (4 Sep 2001 10:55:45 GMT) X-Complaints-To: usenet@news.net.uni-c.dk NNTP-Posting-Date: Tue, 4 Sep 2001 10:55:45 +0000 (UTC) X-Mailer: Mozilla 4.78 [en] (X11; U; OSF1 V4.0 alpha) X-Accept-Language: fo,da,no,sv,is,de,fr,en Xref: archiver1.google.com comp.lang.ada:12679 Date: 2001-09-04T12:55:44+02:00 List-Id: Ed: > 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? Since both: C := T2'Class (Q); and C := T1'Class (B); are legal, the compiler can not possibly figure out which of the two "Is_Item" functions you refer to. If you want the compiler to do a static resolution, you have to specify which type the class-wide variable should be treated as having: T1 (C) := Is_Item; > end Dispatching_Examples_Driver; Jacob -- "Then, after a second or so, nothing continued to happen."