From: AdaMagica <christ-usch.grein@t-online.de>
Subject: Re: two questions on allocators
Date: Sat, 24 Feb 2018 02:18:53 -0800 (PST)
Date: 2018-02-24T02:18:53-08:00 [thread overview]
Message-ID: <e6f8c777-5128-4586-b784-0be908e12569@googlegroups.com> (raw)
In-Reply-To: <93229821-ae3d-4e47-91d9-a20ff3c1f1a7@googlegroups.com>
Am Freitag, 23. Februar 2018 21:42:14 UTC+1 schrieb Mehdi Saada:
> type A is access INTEGER;
> type B is access not null A;
> type C is access B;
> Object_C : C := new B;
> is allowed, but not
> type A is access INTEGER;
> type B is access A;
> type C is access B;
> Object_C : C := new not null B; ?? What's the difference ?
As Shark8 has already said, new not null B is a syntax error.
> If the designated type of the allocator is class-wide, the accessibility level of the type determined by the subtype_indication or qualified_expression shall not be statically deeper than that of the type of the allocator.
>
> -> what means the last "type of the allocator" ? Is it the same than "designed type of the allocator" ?
> Does it refer to this situation ? ->
> type T is access some_tagged_type'Class;
> POINTER : T;
> declare
> type CHILD is new some_tagged_type with ...
> begin
> POINTER := new CHILD; --illegal
> end;
The access object is POINTER, its type is T, the designated (not designed) type is some_tagged_type'Class, the type determined by the subtype_indication is Child, as you have declared.
next prev parent reply other threads:[~2018-02-24 10:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-23 20:42 two questions on allocators Mehdi Saada
2018-02-23 22:30 ` Shark8
2018-02-23 23:30 ` Mehdi Saada
2018-02-25 2:17 ` Randy Brukardt
2018-02-24 10:20 ` AdaMagica
2018-02-24 10:18 ` AdaMagica [this message]
2018-02-25 12:12 ` Mehdi Saada
2018-02-26 23:02 ` Randy Brukardt
2018-02-28 16:09 ` Robert A Duff
2018-02-28 23:37 ` Randy Brukardt
2018-03-01 8:30 ` Dmitry A. Kazakov
2018-03-01 23:17 ` Robert A Duff
2018-03-01 23:47 ` Shark8
2018-03-02 9:20 ` Simon Wright
2018-03-02 22:37 ` Randy Brukardt
2018-03-02 22:31 ` 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