From: Simon Wright <simon@pogner.demon.co.uk>
Subject: Constraints?
Date: 1998/12/22
Date: 1998-12-22T00:00:00+00:00 [thread overview]
Message-ID: <x7v7lvkk7f8.fsf@pogner.demon.co.uk> (raw)
(I think I forgot to post this one, it hasn't appeared here yet; if
duplicated, sorry)
GNAT thinks the code below is OK, Object Ada (special edition)
doesn't. If OA is right, as I fear it may be, can anyone offer a way
of getting the effect I'm after?
(t is some abstract base container, i is an abstract iterator over
such a container, n is a concrete container, r is a concrete iterator
over an n)
package foo is
type t is abstract tagged null record;
type i (f : access t'class) is abstract tagged limited null record;
type n is new t with null record;
type r (f : access n) is new i (f) with null record;
-- OA says foo.ads: Error: line 5 col 37 LRM:3.7(15), Subtype of
-- discriminant must be statically compatible with subtype of the
-- corresponding parent discriminant
end foo;
next reply other threads:[~1998-12-22 0:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-12-22 0:00 Simon Wright [this message]
1998-12-22 0:00 ` Constraints? David C. Hoos, Sr.
1998-12-25 0:00 ` Constraints? Simon Wright
1998-12-25 0:00 ` Constraints? dewar
1998-12-30 0:00 ` Constraints? Steve Todd
1998-12-23 0:00 ` Constraints? dewar
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox