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,e5eb8ca5dcea2827 X-Google-Attributes: gid103376,public From: Samuel Mize Subject: Re: Ada OO Mechanism Date: 1999/05/28 Message-ID: <7imeip$1ttf@news1.newsguy.com>#1/1 X-Deja-AN: 483169919 References: <7i05aq$rgl$1@news.orbitworld.net> <7i17gj$1u1k@news2.newsguy.com> <7icgkg$k4q$1@nnrp1.deja.com> <3749E9EC.2842436A@aasaa.ofe.org> <7id2eo$fag@drn.newsguy.com> <3749FF7D.F17CE16A@aasaa.ofe.org> <374AC676.F7AE0772@lmco.com> <7ieuja$5v9@news1.newsguy.com> <7ik1e5$8bc@news1.newsguy.com> Organization: ImagiNet Communications, Ltd. User-Agent: tin/pre-1.4-981002 ("Phobia") (UNIX) (AIX/3-2) Newsgroups: comp.lang.ada Date: 1999-05-28T00:00:00+00:00 List-Id: Hyman Rosen wrote: > Samuel Mize writes: >> I hope you find this of some interest. > > I'm trying to wrap my head around this class-wide type stuff. > I'm still at that stage of pre-clarity confusion :-) > > Here's some code I threw at gnat, based on Richard D. Riehle's example. ... > Gnat complains about the assignment to z: > ft.adb:8:14: ambiguous expression (cannot resolve "Get") > ft.adb:8:14: possible interpretation at ft.ads:12 > ft.adb:8:14: possible interpretation at ft.ads:9 > ft.adb:8:14: possible interpretation at ft.ads:6 I did a direct cut and paste to files on my system here and it worked fine. One of us must have an old version of GNAT. I'm using GNAT 3.10 on Windows. I can see an argument that, since a tag-indeterminate value is going into a class-wide type variable, the tag is not determined: > z: T'Class := GetC(a_f); ... > begin > z := Get(a_f); But, like you, I believe the code is correct. You can't have an uninitialized (tag undetermined) class-wide variable, so it ought to dispatch on that tag. Best, Sam Mize -- Samuel Mize -- smize@imagin.net (home email) -- Team Ada Fight Spam: see http://www.cauce.org/ \\\ Smert Spamonam