From: "G.B." <bauhaus@notmyhomepage.invalid>
Subject: Re: renaming as classwide type
Date: Thu, 21 Sep 2023 23:03:02 +0200 [thread overview]
Message-ID: <ueib27$3mp6k$1@dont-email.me> (raw)
In-Reply-To: <99e103fa-53c3-43b0-8a4f-686ca10424cdn@googlegroups.com>
On 21.09.23 21:29, Simon Belmont wrote:
> is it really illegal to rename an object as it's classwide parent? gnat claims so. Similar results using a type extension as a generic formal "in out" object of classwide type.
>
> declare
> type P is interface;
> type C is new P with null record;
>
> o : C;
> r : P'Class renames o; --error
> begin
> null;
> end;
>
> expected type "P'Class" defined at line
> found type "C" defined at line
O does not denote an object of a class-wide type,
I think. However, P'Class (o) does, so that renaming
that would make r be of its declared type P'Class.
next prev parent reply other threads:[~2023-09-21 21:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-21 19:29 renaming as classwide type Simon Belmont
2023-09-21 21:03 ` G.B. [this message]
2023-09-21 23:19 ` Simon Belmont
2023-09-26 5:46 ` Randy Brukardt
2023-09-22 9:31 ` Simon Wright
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox