comp.lang.ada
 help / color / mirror / Atom feed
From: "Jean-Pierre Rosen" <rosen@adalog.fr>
Subject: Re: access on function returning a class wide type
Date: Wed, 20 Nov 2002 09:43:50 +0100
Date: 2002-11-20T09:43:50+01:00	[thread overview]
Message-ID: <arfi2m$om5$1@s1.read.news.oleane.net> (raw)
In-Reply-To: 20021119-223832-295143@foorum.com

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 617 bytes --]


"alex" <xela@netcourrier.com> a �crit dans le message news:
20021119-223832-295143@foorum.com...

> The compiler is expecting a function returning a A_T'Class, ok I
understand.
> But, B_T is in the A_T'Class!
>
Repeat after me:
For any tagged type T, T'Class is a type different from T.

Not just some magic formula saying "well you can put anybody from the family
in here". It is a type in the Ada sense.
Therefore, in your example, the profiles don't match.

--
---------------------------------------------------------
           J-P. Rosen (rosen@adalog.fr)
Visit Adalog's web site at http://www.adalog.fr





  parent reply	other threads:[~2002-11-20  8:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-19 21:38 access on function returning a class wide type alex
2002-11-20  0:11 ` James S. Rogers
2002-11-20  6:39   ` alex
2002-11-20  8:43 ` Jean-Pierre Rosen [this message]
2002-11-20 12:39 ` Dmitry A. Kazakov
2002-11-20 15:32 ` Matthew Heaney
replies disabled

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