comp.lang.ada
 help / color / mirror / Atom feed
* Return value that is an access to array element
@ 2002-08-05 16:57 Martin Dowie
  2002-08-05 23:32 ` Andreas Almroth
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Dowie @ 2002-08-05 16:57 UTC (permalink / 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;





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-08-05 23:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-05 16:57 Return value that is an access to array element Martin Dowie
2002-08-05 23:32 ` Andreas Almroth

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