comp.lang.ada
 help / color / mirror / Atom feed
* discriminants and derived types Q
@ 2003-06-19 22:05 tmoran
  2003-06-20  5:31 ` Robert I. Eachus
  0 siblings, 1 reply; 2+ messages in thread
From: tmoran @ 2003-06-19 22:05 UTC (permalink / 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



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

end of thread, other threads:[~2003-06-20  5:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-19 22:05 discriminants and derived types Q tmoran
2003-06-20  5:31 ` Robert I. Eachus

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