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-Thread: 103376,17182d99840be79c X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!208.49.83.154.MISMATCH!uns-out.usenetserver.com!news.usenetserver.com!pc02.usenetserver.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail Newsgroups: comp.lang.ada Subject: Re: access assignation. Aliasing problems? References: <6766a791-abf3-4571-b5f7-98751a948f13@j78g2000hsd.googlegroups.com> From: Stephen Leake Date: Sat, 02 Feb 2008 05:37:46 -0500 Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/22.1 (windows-nt) Cancel-Lock: sha1:fO91E96owhG65ZL6OYTToh3lyxw= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 5910047a4467ce05e48ed24078 Xref: g2news1.google.com comp.lang.ada:19687 Date: 2008-02-02T05:37:46-05:00 List-Id: "Jeffrey R. Carter" writes: > Javi wrote: >> L.Last := new ListNode'(Item => It, next => null); >> L.First := L.Last; -- this fails, L.First and L.Last are both >> the same type access ListNode > > I suspect you're saying that type List has components such as > > type List is record > First : access Listnode; > Last : access Listnode; In particular, these are _not_ the "same type". In C, they would be, because there "same type" means "same contents". In Ada, "same type" means "same name". The types here have _no_ name; they are anonymous. So they are not the same. -- -- Stephe