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,8660fe29f138b478 X-Google-Attributes: gid103376,public From: Ted Dennison Subject: Dispatching with a child for a parameter? (was: Freezing question) Date: 1999/07/19 Message-ID: <7mvp5p$37b$1@nnrp1.deja.com>#1/1 X-Deja-AN: 502779027 References: <7mlg18$qk0$1@nnrp1.deja.com> <378E57FE.FA7EEB99@averstar.com> <7mnc3q$f6r$1@nnrp1.deja.com> <379347D8.A902583C@averstar.com> X-Http-Proxy: 1.0 x37.deja.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja.com - Share what you know. Learn what you don't. X-Article-Creation-Date: Mon Jul 19 18:01:38 1999 GMT X-MyDeja-Info: XMYDJUIDtedennison Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.6 [en] (WinNT; I) Date: 1999-07-19T00:00:00+00:00 List-Id: In article <379347D8.A902583C@averstar.com>, Tucker Taft wrote: > Ted Dennison wrote: > > Ahhh. I bet that's it. Does that mean that in the example above, Apple > > will inherit *none* of Fruit's operations, since none of them were > > declared before Apple? > > Correct. See 7.3.1(7). Ahhh. OK. So I'll ask the next question (with the topic appropriately renamed: How would one implement a hierarchy where one object has dispatching operations that take a specific one of its chilren types as parameters? I'm running out of ideas. eg: type Widget is abstract tagged private; type Container is abstract new Widget with private; procedure Add (Child : in out Widget; Parent : in out Container'Class ); Won't quite work because Add won't be inherited by any Containers unless it is placed before the declaration of Container. But if I move it between the two declarations, it won't compile because Container won't have been declared yet. -- T.E.D. Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.