comp.lang.ada
 help / color / mirror / Atom feed
* What's wrong with this program?
@ 2002-06-07 22:04 Allison Greene
  2002-06-07 23:16 ` sk
  2002-06-08  3:00 ` Jeffrey Carter
  0 siblings, 2 replies; 4+ messages in thread
From: Allison Greene @ 2002-06-07 22:04 UTC (permalink / raw)



procedure Test_Discriminant is
   type Base is tagged null record;

   type Tower is new Base with
      record
         I : Integer;
      end record;

   Instance: Tower (I => 5);
begin
   null;
end Test_Discriminant;

Result of compiling with GNAT:

[localhost:~/lexicon] wrg% gnatmake -v test_discriminant.adb

GNATMAKE 5.00w (20010924) Copyright 1995-2001 Free Software Foundation,
Inc.
  "test_discriminant.ali" being checked ...
  -> "test_discriminant.ali" missing.
gcc -c test_discriminant.adb
test_discriminant.adb:13:20: invalid constraint: type has no
discriminant
End of compilation
gnatmake: "test_discriminant.adb" compilation error
[localhost:~/lexicon] wrg% 

Q: What discriminant?  What am I doing wrong here?

-- 
-- Bill Greene



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

end of thread, other threads:[~2002-06-08  4:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-07 22:04 What's wrong with this program? Allison Greene
2002-06-07 23:16 ` sk
2002-06-08  3:00 ` Jeffrey Carter
2002-06-08  4:40   ` William R. Greene

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