comp.lang.ada
 help / color / mirror / Atom feed
From: "Alex R. Mosteo" <alejandro@mosteo.com>
Subject: Bug with variant derived from interface?
Date: Wed, 03 Jun 2009 19:09:17 +0200
Date: 2009-06-03T19:09:17+02:00	[thread overview]
Message-ID: <78np2hF1ndha3U1@mid.individual.net> (raw)

Before reporting a bug to Adacore I'd like to have your opinion. With the 
following test program I get the error below in both GPL2008/2009.

procedure Bugcase is
  
   --  type Base is abstract tagged null record;
   --  This works

   type Base is interface;
   --  This does not work.

   type Derived_Ok (X : Boolean) is new Base with null record;

   type Derived_Also_Ok (X : Boolean) is new Base with record
      Y : Integer;
   end record;

   type Derived_Bad (X : Boolean) is new Base with record
      --  Above line is the one failing.
      case X is
         when others => null;
      end case;
   end record;

begin
   null;
end Bugcase;


$ gnatmake bugcase.adb
gcc -c bugcase.adb
bugcase.adb:14:09: call to abstract function must be dispatching
gnatmake: "bugcase.adb" compilation error




             reply	other threads:[~2009-06-03 17:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-03 17:09 Alex R. Mosteo [this message]
2009-06-03 22:12 ` Bug with variant derived from interface? Adam Beneschan
2009-06-04  8:14   ` Alex R. Mosteo
replies disabled

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