comp.lang.ada
 help / color / mirror / Atom feed
* Constraints?
@ 1998-12-22  0:00 Simon Wright
  1998-12-22  0:00 ` Constraints? David C. Hoos, Sr.
  1998-12-23  0:00 ` Constraints? dewar
  0 siblings, 2 replies; 6+ messages in thread
From: Simon Wright @ 1998-12-22  0:00 UTC (permalink / 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;




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

end of thread, other threads:[~1998-12-30  0:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-12-22  0:00 Constraints? Simon Wright
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

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