comp.lang.ada
 help / color / mirror / Atom feed
From: "Martin Dowie" <martin.dowie@btopenworld.com>
Subject: Return value that is an access to array element
Date: Mon, 5 Aug 2002 16:57:07 +0000 (UTC)
Date: 2002-08-05T16:57:07+00:00	[thread overview]
Message-ID: <aimap3$ihe$1@paris.btinternet.com> (raw)

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;





             reply	other threads:[~2002-08-05 16:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-05 16:57 Martin Dowie [this message]
2002-08-05 23:32 ` Return value that is an access to array element Andreas Almroth
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox