Subject: | |
From: | |
Reply To: | |
Date: | Thu, 15 Jul 1999 17:25:27 -0400 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Christoph & Ursula Grein wrote:
>
> Stanley Allen schrieb:
> ...
> > -- Fancy is derived from an unconstrained type, in this view
> > --
> > -- COMPILER A complains, referencing RM95 3.7(13)
> > -- COMPILER B accepts, here is a comment from vendor B:
> > --
> > -- "COMPILER B is correct here, the declaration of derived
> > -- type Fancy in your example is legal. The full type is
> > -- derived from a constrained view of the parent type and
> > -- doesn't violate the stated rule."
> > --
> > -- COMPILER B reports an error if Fancy is not a private type,
> > -- but is declared instead as this:
I responded to this in comp.lang.ada. Basically, Compiler B is
correct. 3.7(13) doesn't apply to private extensions. It applies
only to types defined by a derived_type_definition, which includes
"normal" derived types and record extensions, but not private extensions.
>
> OK, I'm no language lawyer, but my two ? cents:
>
> > --
> > -- type Fancy (N : access Integer) is new Basic with null record;
> > --
>
> This declaration is illegal in any case because there is no private part
> which could provide values for the unknown discriminants.
I think you missed on this one. The declaration is legal. See 7.3(8,9).
> ...
> As I said, my 2 ? (Euro) cents.
> ...
> Christoph Grein
> Mitglied von Ada-Deutschland
> Member of Ada Germany
> http:/www.ada-deutschland.de
>
> http://home.T-Online.de/home/Christ-Usch.Grein
> eMail: [log in to unmask]
--
-Tucker Taft [log in to unmask] http://www.averstar.com/~stt/
Technical Director, Distributed IT Solutions (www.averstar.com/tools)
AverStar (formerly Intermetrics, Inc.) Burlington, MA USA
|
|
|