From: Robert A Duff <bobduff@TheWorld.com>
Subject: Re: 'Class'Class'Class'Class ad libitum
Date: Tue, 13 Sep 2016 14:53:15 -0400
Date: 2016-09-13T14:53:15-04:00 [thread overview]
Message-ID: <wcceg4nr5r8.fsf@TheWorld.com> (raw)
In-Reply-To: nr8nv8$i3v$1@dont-email.me
"J-P. Rosen" <rosen@adalog.fr> writes:
> I guess this is allowed because nobody cared about complicated rules to
> forbid it (mainly on the ground that it's useless, but harmless).
I think it was to make this work:
generic
type Formal (<>) is tagged private;
package G is
pragma Elaborate_Body;
end G;
package body G is
subtype S is Formal'Class;
end G;
with G;
package P is
type T is tagged null record;
package Inst is new G (Formal => T'Class);
end P;
We don't want the legality of an instance to depend on the contents of
the generic body.
> ...There
> are many things like that:
> T'(T'(T'(X)))
> X+0+0+0
> ...
- Bob
next prev parent reply other threads:[~2016-09-13 18:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-13 10:43 'Class'Class'Class'Class ad libitum Alejandro R. Mosteo
2016-09-13 11:29 ` J-P. Rosen
2016-09-13 16:10 ` Alejandro R. Mosteo
2016-09-13 18:53 ` Robert A Duff [this message]
2016-09-13 12:37 ` Dmitry A. Kazakov
2016-09-13 16:10 ` Alejandro R. Mosteo
2016-09-13 16:34 ` Dmitry A. Kazakov
2016-09-13 16:54 ` Alejandro R. Mosteo
2016-09-13 18:41 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox