comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: discriminants and derived types Q
Date: Thu, 19 Jun 2003 22:05:22 GMT
Date: 2003-06-19T22:05:22+00:00	[thread overview]
Message-ID: <CsqIa.1046202$Zo.241120@sccrnsc03> (raw)

I have two compilers that accept this package spec, and one that complains
about child3, though it accepts child1 and child2.  Who's right and why?

package testsd is

  type parent1(a,b:integer) is record null;end record;
  type child1(b:integer) is new parent1(a=>1,b=>b);

  type parent2(a,b:integer) is tagged null record;
  type child2(b:integer) is new parent2(a=>1,b=>b) with null record;

  type parent3(a,b:integer) is tagged null record;
  type child3(b:integer) is new parent3(a=>1,b=>b) with private;
                           --   ^  error point

private
  type child3(b:integer) is new parent3(a=>1,b=>b) with null record;

end testsd;

testsd.ads:10:33:  Only static constraints allowed for parent
discriminants in the partial view



             reply	other threads:[~2003-06-19 22:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-19 22:05 tmoran [this message]
2003-06-20  5:31 ` discriminants and derived types Q Robert I. Eachus
replies disabled

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