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,b5c82fc60f790fde,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-08-05 09:58:09 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!kibo.news.demon.net!demon!btnet-peer0!btnet-feed5!btnet!news.btopenworld.com!not-for-mail From: "Martin Dowie" Newsgroups: comp.lang.ada Subject: Return value that is an access to array element Date: Mon, 5 Aug 2002 16:57:07 +0000 (UTC) Organization: BT Openworld Message-ID: NNTP-Posting-Host: host213-123-148-176.in-addr.btopenworld.com X-Trace: paris.btinternet.com 1028566627 18990 213.123.148.176 (5 Aug 2002 16:57:07 GMT) X-Complaints-To: news-complaints@lists.btinternet.com NNTP-Posting-Date: Mon, 5 Aug 2002 16:57:07 +0000 (UTC) X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MSMail-Priority: Normal X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Xref: archiver1.google.com comp.lang.ada:27716 Date: 2002-08-05T16:57:07+00:00 List-Id: Given the following code, should a compiler raise an error given LM 3.10.2 (25) as an error or not? generic type T is private; type TA is access all T; package Foo is type XT is private; function Get (X : XT) return TA; private type AT is array (Positive range <>) of aliased T; type AA is access AT; type XT is record A : AA; end record; end Foo; package body Foo is function Get (X : XT) return TA is begin return X.A (1)'Access; -- Error here? end Get; end Foo;