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 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5c9ae6c7b4ac5676,start X-Google-Attributes: gid103376,public From: reason67@my-deja.com Subject: Limiting inheritance Date: 2000/07/27 Message-ID: <8lq7tj$5rt$1@nnrp1.deja.com>#1/1 X-Deja-AN: 651555402 X-Http-Proxy: NetCache@www-blv-proxy2.boeing.com: Version NetApp Release 3.4D6: Mon Aug 23 16:40:19 PDT 1999-Solaris, 1.0 x55.deja.com:80 (Squid/1.1.22) for client 12.13.226.12 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Thu Jul 27 21:00:38 2000 GMT X-MyDeja-Info: XMYDJUIDreason67 Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.5 [en]C-CCK-MCD Boeing Kit (Win95; I) Date: 2000-07-27T00:00:00+00:00 List-Id: Let's day I have the types specified as follows: package Patch is type Patch_Type is (red, orange, yellow, green, blue, violet); subtype Base_Patch_Type is Patch_Type Red .. Green; type Object is tagged private; ... procedure Set_Patch_Kind (To : in Base_Patch_Type; In_Object : in Object); ... private type Object is tagged record ... Kind : Patch_Type; ... end record; end Patch; package Patch.Fancy is subtype Fancy_Patch_Kind is Patch_Kind Blue .. Violet; type Object is new Patch.Object with tagged private; ... procedure Set_Patch_Kind (To : in Fancy_Patch_Type; In_Object : in Object); ... private type Object is new Patch.Object with record ... end record; end Patch.Fancy; OK. What I am trying to do is enforce the Kind to the subtype that makes sense in the parent or the child. I can not do what I show above because it does not compile (Dispatching operation is not subtype conformant) I can make the procedres 2 different names but if I go that route, I want to NOT inherit the procedure from the parent to the child. Is there a way to do this? --- Jeffrey Sent via Deja.com http://www.deja.com/ Before you buy.