comp.lang.ada
 help / color / mirror / Atom feed
* two questions on allocators
@ 2018-02-23 20:42 Mehdi Saada
  2018-02-23 22:30 ` Shark8
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Mehdi Saada @ 2018-02-23 20:42 UTC (permalink / raw)


2.2/3: for an allocator with a subtype indication, the subtype indication shall not specify a null exclusion
why 
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 ?
_______________________________

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;

Technical details of this section aren't gonna matter for me any time soon, so that will be all.


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

end of thread, other threads:[~2018-03-02 22:37 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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