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=-2.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fcb020a71edc13e4 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-08 06:53:51 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news-out.visi.com!petbe.visi.com!news2.telebyte.nl!newsfeed.stueberl.de!proxad.net!freenix!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: "amado.alves" Newsgroups: comp.lang.ada Subject: RE: Problem whith objects, access and abstract tagged private types Date: Thu, 8 Jan 2004 14:51:29 -0000 Organization: Cuivre, Argent, Or Message-ID: NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: melchior.cuivre.fr.eu.org 1073573512 95532 80.67.180.195 (8 Jan 2004 14:51:52 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Thu, 8 Jan 2004 14:51:52 +0000 (UTC) To: Return-Path: X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 content-class: urn:content-classes:message Thread-Topic: Problem whith objects, access and abstract tagged private types Thread-Index: AcPV8Hg3bNlsN95kQk6BovTWbjee/gABP/oA X-OriginalArrivalTime: 08 Jan 2004 14:51:35.0172 (UTC) FILETIME=[E971B440:01C3D5F6] X-Virus-Scanned: by amavisd-new-20030616-p5 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.3 Precedence: list List-Id: Gateway to the comp.lang.ada Usenet newsgroup List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:4207 Date: 2004-01-08T14:51:29+00:00 << ... type Item_Elmt is access all Item_Type'Class; ... function To_Item_Elmt (F : in Item_Type'Class) return Item_Elmt is My_Tag : constant Ada.Tags.Tag :=3D F'Tag; begin return new My_Tag' (F); end To_Item_Elmt; >> According to your own definition of Item_Elmt and To_Item_Elmt you must = return an access value, not a Tag. Maybe you want to return an access to = F. As it stands, you cannot, because F might be a value. If the actual = parameter passed is always a variable then use mode in out for F. The = return something along the lines of F'Access.