From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY,T_FILL_THIS_FORM_SHORT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,433bd69c0b08a87a,start X-Google-Attributes: gid103376,public From: fabien_bousquet@my-deja.com Subject: Problem with Ada 95 inheritance and GNAT Date: 2000/04/18 Message-ID: <8di1bo$s0d$1@nnrp1.deja.com>#1/1 X-Deja-AN: 612726227 X-Http-Proxy: 1.0 x34.deja.com:80 (Squid/1.1.22) for client 194.117.218.130 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Tue Apr 18 16:10:07 2000 GMT X-MyDeja-Info: XMYDJUIDfabien_bousquet Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows NT) Date: 2000-04-18T00:00:00+00:00 List-Id: I am a novice in Ada 95. I am trying to use inheritance with Ada 95. I have written some programs which are compiling well with an evaluation version of ObjectAda 7.1. These programs do not compile with GNAT 3.12p on Windows NT. Below this line there is two small examples which are not compiling with GNAT. First example : GrandParent.ads package GrandParent is type T_GrandParent(size : Positive) is tagged private; private type T_GrandParent(size : Positive) is tagged null record; end GrandParent; Parent.ads with GrandParent; package Parent is type T_GrandParent3 is new GrandParent.T_GrandParent(3) with null record; type T_Parent is new T_GrandParent3 with private; private type T_Parent is new T_GrandParent3 with null record; end Parent; During Parent.ads compilation, GNAT returns the error message : "Parent subtype of full type must be unconstrained". Second example : GrandParent.ads idem eg 1 Parent.ads with GrandParent; package Parent is type T_Parent is new GrandParent.T_GrandParent(3) with private; private type T_Parent is new GrandParent.T_GrandParent(3) with null record; end Parent; Child.ads with Parent; package Child is type T_Child is new Parent.T_Parent with private; private type T_Child is new Parent.T_Parent with null record; end Child; During Child.ads compilation, GNAT returns the error message : "Parent of full type must descend from parent of private extension". Could you help me please ? Fabien Bousquet Sent via Deja.com http://www.deja.com/ Before you buy.