comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Limited type in generic package causes double free or corruption
Date: Wed, 28 Sep 2016 09:20:23 -0700
Date: 2016-09-28T09:20:23-07:00	[thread overview]
Message-ID: <nsgqjt$5nr$1@dont-email.me> (raw)
In-Reply-To: <374b0d79-541d-44d2-886e-dd41f8815914@googlegroups.com>

On 09/28/2016 06:25 AM, onox wrote:
> 
>    --  If Trees.Tree (A.Tree) is limited, shouldn't this function be disallowed?
>    function Get_Tree (Object : Thing) return Trees.Tree is
>      (Object.My_Tree);

What do you get if you rewrite this function as

function Get_Tree (Object : Thing) return Trees.Tree is
begin
   return Object.My_Tree;
end Get_Tree;

? The two forms should be equivalent.

-- 
Jeff Carter
"Death awaits you all, with nasty, big, pointy teeth!"
Monty Python & the Holy Grail
20


  parent reply	other threads:[~2016-09-28 16:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-28 13:25 Limited type in generic package causes double free or corruption onox
2016-09-28 16:06 ` Dmitry A. Kazakov
2016-09-28 16:20 ` Jeffrey R. Carter [this message]
2016-09-28 18:41   ` onox
2016-09-28 19:51     ` Jeffrey R. Carter
2016-09-29  8:12     ` Alejandro R. Mosteo
2016-09-28 17:27 ` Anh Vo
2016-09-28 17:34 ` AdaMagica
2016-09-28 21:42   ` Randy Brukardt
replies disabled

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