From: "Nick Roberts" <Nick.Roberts@dial.pipex.com>
Subject: Re: statically compatible access discriminants in derivation
Date: 1998/01/16
Date: 1998-01-16T00:00:00+00:00 [thread overview]
Message-ID: <01bd2219$965dd320$25fc82c1@xhv46.dial.pipex.com> (raw)
In-Reply-To: 69gucb$l9k$1@uuneo.neosoft.com
I think if you look closely at the wording of 4.9.1(4), you will see that
in the derivation definition
type object( board : access device_instance.object'class ) is new
unit_if.object( board ) with null record;
the subtype of the board in the parent type (unit_if.object) is 'statically
compatible' with the subtype of the new discriminant, because (a) it is an
access type, and (b) the parent type's discriminant's subtype is
unconstrained. All class-wide types are unconstrained.
So I believe you can do what you put in the example.
I cannot claim to be authoritative here: others may know better than me
(please, don't laugh, I have my pride you know :-).
--
Nick Roberts
Croydon, UK
Proprietor, ThoughtWing Software; Independent Software Development
Consultant
* Nick.Roberts@dial.pipex.com * Voicemail & Fax +44 181-405 1124 *
*** Eats three shredded spams every morning for breakfast ***
Pat Rogers <progers@acm.org> wrote in article
<69gucb$l9k$1@uuneo.neosoft.com>...
> Given a tagged type with an access discriminant designating a
> classwide type, and a child type derived from this parent type, is it
> possible to declare an access discriminant in the child type that is
> statically compatible with the parent's access discriminant, while having
> the child's access discriminant designate a classwide type further down
in
> the parent's designated derivation class?
> [etc...]
next prev parent reply other threads:[~1998-01-16 0:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-01-13 0:00 statically compatible access discriminants in derivation Pat Rogers
1998-01-16 0:00 ` Nick Roberts [this message]
1998-01-17 0:00 ` Tucker Taft
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox